2016年3月10日

R ts()函数设定时间序列

摘要: 对于已有的Excel中的数据,如何整理成时间序列格式呢? > setwd("C:\\Users\\Admin-pc\\Desktop")> time<-read.csv("data1.csv")> time$b> a<-ts(time$b, frequency = 1, start = c(1900 阅读全文

posted @ 2016-03-10 17:35 Bella_bing 阅读(5254) 评论(0) 推荐(1) 编辑

R 如何修改数据和变量名

摘要: 可使用fix修改数据框的数据和数据类型 > df<-data.frame(x1=c(1,2,3,4),x2=c(5,6,7,8)) > df x1 x2 1 1 5 2 2 6 3 3 7 4 4 8 > fix(df) 若想要修改变量名字 > names(df) [1] "x1" "x2" > n 阅读全文

posted @ 2016-03-10 10:11 Bella_bing 阅读(4481) 评论(1) 推荐(1) 编辑

导航