從 sapply 到 vapply
本練習屬於課程
R 中級
練習說明
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# temp is already defined in the workspace
# Convert to vapply() expression
sapply(temp, max)
# Convert to vapply() expression
sapply(temp, function(x, y) { mean(x) > y }, y = 5)本練習屬於課程
試著完成這個範例程式碼,體驗一下這個練習。
# temp is already defined in the workspace
# Convert to vapply() expression
sapply(temp, max)
# Convert to vapply() expression
sapply(temp, function(x, y) { mean(x) > y }, y = 5)