Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X ?
A. apply(x,1,min)
B. apply(x,2,max)
C. col.max(x)
D. apply(X, MARGIN, FUN, …)
Answer:A
Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X ?
A. apply(x,1,min) B. apply(x,2,max) C. col.max(x) D. apply(X, MARGIN, FUN, …)
Explanation:apply(x,2,max) finds the maximum for each column. 4. Which of the following statement finds the maximum for each column ?