sapply(s,function(x) colMeans(x[,c("Ozone","Wind","Temp")]為什么寫成sapply(s, colMeans(s[,c("Ozone","Wind","Temp")]就不行呢
sapply(s,function(x) colMeans(x[,c("Ozone","Wind","Temp")]為什么寫成sapply(s, colMeans(s[,c("Ozone","Wind","Temp")]就不行呢
sapply(s,function(x) colMeans(x[,c("Ozone","Wind","Temp")]為什么寫成sapply(s, colMeans(s[,c("Ozone","Wind","Temp")]就不行呢
2017-04-17
舉報
2017-04-18
s是列表,x是s中的數(shù)據(jù)框。對于colmeans函數(shù),只能作用與矩陣或者數(shù)據(jù)框