1.

Dataframes can be converted into a matrix by calling the following function data ______(a) matr()(b) matrix()(c) matrixf()(d) matrixfunc()The question was posed to me during an online exam.Enquiry is from Basics topic in chapter History, Overview and Getting Started of R Programming

Answer»

The CORRECT option is (B) matrix()

The explanation: as.matrix function should be used to coerce a data FRAME to a matrix. It might SEEM that the as.matrix() function should be used to coerce a data frame to a matrix.



Discussion

No Comment Found

Related InterviewSolutions