vapply の使い方(2)
この演習はコースの一部です
中級 R
演習の手順
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# temp is already available in the workspace
# Definition of the basics() function
basics <- function(x) {
c(min = min(x), mean = mean(x), median = median(x), max = max(x))
}
# Fix the error:
vapply(temp, basics, numeric(3))