Q. What will be the output of the following R code?
> x <- list(a = 1:5, b = rnorm(10))
> lapply(x, mean)

  • (A) $a [1] 3 $b [1] 0.1322028
  • (B) $a [1] 4 $b [1] 0.1322028
  • (C) $a [1] 5 $b [1] 0.1322028
  • (D) $a [2] 5 $b [1] 3
πŸ’¬ Discuss
βœ… Correct Answer: (A) $a [1] 3 $b [1] 0.1322028

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
95
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate