1.

Factors are created using the _______ function.(a) C()(b) Function()(c) Array()(d) Lists()I got this question during an internship interview.The origin of the question is Data Types in portion Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

The correct option is (B) Function()

Best explanation: Factors are created using the factor() function. The labels are always CHARACTER irrespective of WHETHER it is numeric or character or also Boolean etc. in the vector. The nlevels functions will give the COUNT of levels.



Discussion

No Comment Found

Related InterviewSolutions