1.

What is the function to set row names for a data frame?(a) row.names()(b) colnames()(c) col.names()(d) column name cannot be set for a data frameI had been asked this question in final exam.My question is from Basics topic in section History, Overview and Getting Started of R Programming

Answer»

The CORRECT choice is (a) ROW.NAMES()

EXPLANATION: row.names() is the function to set row names for a DATA frame. Data frames have a special attribute called row.names, which indicate information about each row of the data frame.



Discussion

No Comment Found

Related InterviewSolutions