1. Which function can be used when a vector needs to be split into groups defined by a classifying factor, compute a function on the subsets, and return the results?
View Answer
tapply
2. Which function is very similar to lapply?
View Answer
sapply
3. Applying lapply function on a matrix returns
View Answer
list
4. A hospital data contains patient's age and treatment they are undergoing. Which function can be used to find average of patients undergoing each of the treatments?
View Answer
tapply
5. Which function is used over the margins of an array
View Answer
apply