Google News
logo
R - Quiz(MCQ)
Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X?
A)
col.max(x)
B)
apply(x,1,min)
C)
apply(x,2,max)
D)
apply(X, MARGIN, FUN, …)

Correct Answer :   apply(X, MARGIN, FUN, …)


Explanation : apply(x,2,max) finds the maximum for each column.

Advertisement