Google News
logo
R - Quiz(MCQ)
Which of the following statement finds the maximum for each column?
A)
col.max(x)
B)
apply(x,2,max)
C)
which.min(x)
D)
which.max(x)

Correct Answer :   apply(x,2,max)


Explanation : col.max(x) is another way to find which column has the maximum value for each row.

Advertisement