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. MatOfPoint作为minAreaRect的参数总是报错"throw new IllegalArgumentException("Incomatible Mat");

    MatOfPoint matPt = contours.get(i)       minRect.set(i, Imgproc.fitEllipse( new  MatOfPoint2f(matPt) ...

  2. ubuntu安装和配置SVN【转】

    ubuntu安装和配置SVN 转自:http://www.jb51.net/os/Ubuntu/56394.html 第一步:安装apache2  libapache2-svn subversion ...

  3. 《大道至简-Team》

    已经学习了<大道至简>两章,我们了解了编程的本质和“懒人”造就了方法.书中没有提供给我们编程的技巧,捷径,而是从别的方面为我们讲解了编程的精义.第三章就为我们引入了“团队”这个概念. 我们 ...

  4. C#图片切割、图片压缩、缩略图生成

    C#图片切割.图片压缩.缩略图生成的实现代码 /// 图片切割函数  /// </summary>  /// <param name="sourceFile"&g ...

  5. BZOJ 1041 圆上的整点

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1041 题意:求圆x^2+y^2=r^2上的整点. 思路:由于对称性,我们只需要计算第一象 ...

  6. leetcode:Count Primes

    Description:Count the number of prime numbers less than a non-negative number, n. 本题给定一个非负数n,让我们求小于n ...

  7. pl/sql programming 05 循环迭代处理

    使用循环应考虑的因素 1. 循环什么时候结束 2. 什么时候测试是否该结束循环 3. 采用这种循环的原因 1. 普通循环(简单循环) 使用场合, 不能确定循环执行多少次, 要求循环至少执行一次. 另外 ...

  8. POJ3415 Common Substrings

    后缀数组 求长度不小于k的公共子串的个数 代码: #include <stdio.h> #include <string.h> ; int len, len1; int wa[ ...

  9. NPOI导出Excel表功能实现(多个工作簿)(备用)

    Excel生成操作类: 代码 using System; using System.Collections.Generic; using System.Text; using System.IO; u ...

  10. Bootstrap介绍以及配置

    一.Bootstrap概述: 1.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的一个用于快速开发 Web 应用程序和网站的前端框架. 2.用于开发响应式布局.移动设备优先的 W ...