摘要:
factor(x = character(), levels, labels = levels, exclude = NA, ordered = is.ordered(x), nmax = NA) levels因子水平,如果不指定,就是x中所有不重复的值 labels水平标识名称 exclude排除 阅读全文
摘要:
> open<-c(2529,2468,2417,NA) > high<-c(2529,2483,2419,2419) > SSEC<-data.frame(open=open,high=high) > SSEC open high 1 2529 2529 2 2468 2483 3 2417 24 阅读全文
摘要:
Ø sort sort(x, decreasing = FALSE, ...) ## Default S3 method: sort(x, decreasing = FALSE, na.last = NA, ...) sort.int(x, partial = NULL, na.last = NA, 阅读全文
摘要:
函数transform 作用:为原数据框添加新的列,改变原变量列的值,通过赋值NULL删除列变量 用法: transform(‘data’,….) data就是要修改的data, '…..'代表你要进行的修改 1:transform(airquality, new.col = Wind^2) #添加 阅读全文
摘要:
> seq(from=10,to=20,by=3) [1] 10 13 16 19 > seq(from=10,to=20,length=5) [1] 10.0 12.5 15.0 17.5 20.0 ## Default S3 method: seq(from = 1, to = 1, by = 阅读全文
摘要:
> x<-c(6,1,2,3,NA,12) > x[x>5] #x[5]是未知的,因此其值是否大于5也是未知的 [1] 6 NA 12 > subset(x,x>5) #subset直接会把NA移除 [1] 6 12 > subset(airquality, Temp > 80, select = 阅读全文
摘要:
> x<-1:10 > any(x>8) [1] TRUE > all(x>8) [1] FALSE 阅读全文
摘要:
2016年11月5日 We are proud to announce that Apache Spark won the 2016 CloudSort Benchmark (both Daytona and Indy category). A joint team from Nanjing Uni 阅读全文