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的更多相关文章

  1. 执行shell脚本出错'\r': command not found

    在linux中执行脚本时出错 $'\r': command not found 错误原因是在脚本中有空行,如果脚本是在Windows下进行编辑之后上传到linux上去执行的话,就会出现这个问题. 因为 ...

  2. Shell脚本出现$'\r': command not found

    Centos7下执行shell脚本报错如下 [root@ip---- ~]# sh install_zabbix_agent.sh install_zabbix_agent.: $'\r': comm ...

  3. shell脚本执行错误 $'\r':command not found

    shell脚本执行错误 $'\r':command not found Linux下有命令dos2unix 可以用一下命令测试 vi -b filename 我们只要输入dos2unix *.sh就可 ...

  4. $'\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 $' ...

  5. shell脚本遇到问题"$'\r': command not found"

    shell脚本写得一切正常,但是一执行就报错: line: XXX "$'\r': command not found" 问题原因:文件格式问题(虽然在window和linux上选 ...

  6. $'\r': command not found

    在Linux下执行程序最省事的方式就是将系统的执行流程封装成一个shell脚本,上传到linux环境中后就可以直接执行了,但是今天在具体实施的时候出现了错误 $'\r': command not fo ...

  7. Linux Shell 错误: $'\r': command not found错误解决

    在Linux下执行程序最省事的方式就是将系统的执行流程封装成一个shell脚本,上传到linux环境中后就可以直接执行了,但是今天在具体实施的时候出现了错误 $'\r': command not fo ...

  8. 解决shell脚本错误$’r’ command not found

    从windows上传了一个脚本到Linux上执行 出现如下错误:$'\r': command not found这是windows与Unix文本编辑的默认格式不同造成的,需要转成unix格式. 解决方 ...

  9. Linux 错误: $'\r': command not found

    是linux无法解析$'\r'.这其实是windows与linux系统的差异导致的. 因为linux上的换行符为\n,而windows上的换行符为\r\n.所以脚本到linux上就无法解析了. 通常的 ...

随机推荐

  1. Data Base MongoDB 插入时间不正确的问题

    关于mongodb插入时间不正确的问题 mongodb插入时间: 把本地时间转换为utc时间:  也就是比本地时间少8个小时: 读取的时候又会转换本地时间: 所有一般不需处理:

  2. 18.allegro区域约束规则设置

    一.线宽和线间距 --- ---------------- 然后再电路板上创建一个区域 ----- ---- --- ---- ------------------------------

  3. R语言数据类型转换

    test for data type is.numeric(), is.character(), is.vector(), is.matrix(), is.data.frame() convert i ...

  4. cdoj 1329 卿学姐与魔法 优先队列

    卿学姐与魔法 Time Limit: 1200/800MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Sta ...

  5. jsonp从服务器读取数据并且予以显示

    之前看了许多的关于jsonp的文章,大多是讲的比较的模糊的,下面是我的个人的理解! 基于这样的一段代码,做下解释: 这是在jsonp中读取数据的时候(取出来当然是json的格式json格式不清楚的,可 ...

  6. Git超级实用使用教程

    一篇git入门实用教程,原文地址http://www.cnblogs.com/tugenhua0707/p/4050072.html 一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. ...

  7. XML文件读取工具类

    /// <summary> /// Author: jiangxiaoqiang /// </summary> public class XmlReader { //===== ...

  8. R语言,NA,NAN

    好莫名其妙的结果 is.na() #NA得不到的值is.nan() #NAN不可能的值is.infinite() #无穷的 x1<-NA x2<-0/0x3<-1/0 is.na(x ...

  9. jquery仿天猫商城左侧导航菜单

    之前看到有博友写了一个仿天猫商城左侧导航菜单,可惜不提供免费下载,也没有代码.以前自己也写过类似的效果,只是都是一小块一小块的,现在重新拼凑.我将一步一步的实现拼凑过程,希望对你有所帮助. Demo在 ...

  10. EF5&MVC4 学习1、创建新的Contoso University Application,并创建Model Class 生成对应的database

    参考:http://www.asp.net/mvc/tutorials/getting-started-with-ef-5-using-mvc-4/creating-an-entity-framewo ...