1.

Which of the following statement finds the maximum for each column?(a) apply(x,2,max)(b) col.max(x)(c) which.min(x)(d) which.max(x)I had been asked this question during an interview for a job.Asked question is from Commands topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (a) apply(x,2,MAX)

The BEST I can explain: col.max(x) is another way to find which COLUMN has the maximum value for each row.



Discussion

No Comment Found

Related InterviewSolutions