1.

which of the following statement tells the row with the minimum value for every column?(a) which.min(x)(b) which.max(x)(c) z=apply(x,1,which.min)(d) z=apply(1,1,which.max)This question was addressed to me during an internship interview.I'm obligated to ask this question of Commands in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (a) which.min(x)

The best explanation: which() FUNCTION gives the TRUE indices of a LOGICAL OBJECT, allowing for array indices.



Discussion

No Comment Found

Related InterviewSolutions