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. Backbone Backbone-localStorage demo

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. ADODB.Connection 错误 '800a0e7a'。。

    今天帮同学调程序的时候发现的:错误提示如下: ADODB.Connection 错误 '800a0e7a' 未找到提供程序.该程序可能未正确安装. /hua1/manage/inc/conn.asp, ...

  3. Android应用开发学习笔记之事件处理

    作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz Android提供的事件处理机制分为两类:一是基于监听的事件处理:二是基于回调的事件处理.对于基于监听的事件处理,主 ...

  4. Linux内核基础--事件通知链(notifier chain)

    转载: http://blog.csdn.net/wuhzossibility/article/details/8079025 http://blog.chinaunix.net/uid-277176 ...

  5. SQL高性能查询优化语句

    1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null可以在num上设置 ...

  6. 新环境配置与使用Vim指南

    1.下载源码 git clone git@github.com:vim/vim.git 2.编译 1.安装依赖软件 sudo apt-get install libncurses5-dev libgn ...

  7. 每天一个小算法(Shell sort5)

    希尔排序的关键在于步长的选取. 希尔排序的复杂度比较复杂,主要跟步长的选择有关,大概是 O(n logn^2),一般认为就是介于 O(n^2) 和 O(n logn) 之间.最好步长比较复杂,一般第一 ...

  8. 【Android】MTK Android 编译命令

    命令格式:./maketek [option] [project] [action] [modules] Option: -t ,-tee :输出log信息到当前终端 -o , -opt=-- : 编 ...

  9. leetcode:Coin Change

    You are given coins of different denominations and a total amount of money amount. Write a function ...

  10. 【笨嘴拙舌WINDOWS】GDI绘制区域

    在默认情况下,Gdi绘画操作的使用白纸(窗口的客户区)黑字(Pen的颜色)!前面我们已经讲过如何改笔,现在来学习改变白纸(GDI的绘制区域) 正常的纸为一个矩形形状!有时候小孩不小心撕掉纸的一角,不小 ...