R command
setwd("D:/Research/code/rcode") #notice the "/"
list.files(getwd())
heisenberg <- read.csv(file="simple.csv",head=TRUE,sep=",")
colnames(datatemp)<-c("ID","InsertDate","F1","F2","F3","F4","AccountID","DeviceID","SearchKey") #change the header of the dataframe
简单介绍下R中的各种APPLY函数:
https://screamyao.wordpress.com/2011/05/03/various-apply-functions-in-r-explained/
table_temp_avg_date<-as.data.frame(temp_avg_date) # list to data frame
rm(*) # remove variable
agg_datatemp<-aggregate(datatemp[,3],list(datatemp$Date),mean) # group by column 3 and apply mean
data_stats_temp[grep("hotwaterhours", data_stats_temp$StatsType), ]
R command的更多相关文章
- 执行shell脚本出错'\r': command not found
在linux中执行脚本时出错 $'\r': command not found 错误原因是在脚本中有空行,如果脚本是在Windows下进行编辑之后上传到linux上去执行的话,就会出现这个问题. 因为 ...
- Shell脚本出现$'\r': command not found
Centos7下执行shell脚本报错如下 [root@ip---- ~]# sh install_zabbix_agent.sh install_zabbix_agent.: $'\r': comm ...
- shell脚本执行错误 $'\r':command not found
shell脚本执行错误 $'\r':command not found Linux下有命令dos2unix 可以用一下命令测试 vi -b filename 我们只要输入dos2unix *.sh就可 ...
- $'\r': command not found 或者 syntax error: unexpected end of file 或者 syntax error near unexpected token `$'\r''
执行shell脚本如果报如下错误: syntax error near unexpected token `$'\r'' syntax error: unexpected end of file $' ...
- shell脚本遇到问题"$'\r': command not found"
shell脚本写得一切正常,但是一执行就报错: line: XXX "$'\r': command not found" 问题原因:文件格式问题(虽然在window和linux上选 ...
- $'\r': command not found
在Linux下执行程序最省事的方式就是将系统的执行流程封装成一个shell脚本,上传到linux环境中后就可以直接执行了,但是今天在具体实施的时候出现了错误 $'\r': command not fo ...
- Linux Shell 错误: $'\r': command not found错误解决
在Linux下执行程序最省事的方式就是将系统的执行流程封装成一个shell脚本,上传到linux环境中后就可以直接执行了,但是今天在具体实施的时候出现了错误 $'\r': command not fo ...
- 解决shell脚本错误$’r’ command not found
从windows上传了一个脚本到Linux上执行 出现如下错误:$'\r': command not found这是windows与Unix文本编辑的默认格式不同造成的,需要转成unix格式. 解决方 ...
- Linux 错误: $'\r': command not found
是linux无法解析$'\r'.这其实是windows与linux系统的差异导致的. 因为linux上的换行符为\n,而windows上的换行符为\r\n.所以脚本到linux上就无法解析了. 通常的 ...
随机推荐
- PCA基础理解
- HDU 4607 Park Visit 两次DFS求树直径
两次DFS求树直径方法见 这里. 这里的直径是指最长链包含的节点个数,而上一题是指最长链的路径权值之和,注意区分. K <= R: ans = K − 1; K > R: ans = ...
- 【Tech】Cassandra安装和启动
1.安装 jre,配置系统环境变量: 2.安装python,配置环境变量: 3.下载cassandra,http://cassandra.apache.org/download/: 4.解压,这里我没 ...
- Eclipse项目内存溢出解决方案
方法一: 打开eclipse,选择Window--Preferences...在对话框左边的树上双击Java,再双击Installed JREs,在右边选择前面有对勾的JRE,再单击右边的“Edit” ...
- (三)在js(jquery)中获得文本框焦点和失去焦点的方法
在js(jquery)中获得文本框焦点和失去焦点的方法 文章介绍两个方法和种是利用javascript onFocus onBlur来判断焦点和失去焦点,加一种是利用jquery $(" ...
- mysql高可用方案比较
详见:High Availability Database Tools http://www.acquia.com/blog/high-availability-database-tools
- hdu - 1180 诡异的楼梯 (bfs+优先队列)
http://acm.hdu.edu.cn/showproblem.php?pid=1180 注意点就是楼梯是在harry移动完之后才会改变方向,那么只要统计到达这个点时间奇偶性,就可以知道当前楼梯是 ...
- php关于return的关键字
使用return关键字可以使函数返回值,可以返回包括数组和对象的任意类型,如果省略了 return,则默认返回值为 NULL. function add($a) { return $a+1; } $b ...
- UESTC 1074 秋实大哥搞算数 栈模拟
秋实大哥搞算数 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit S ...
- ASP.NET MVC路由配置
一.命名参数规范+匿名对象 routes.MapRoute(name: "Default", url: "{controller}/{action}/{id}" ...