1.

How is a Data object represented internally in R language?(a) unclass (as.time (“2018-12-28″))(b) unclass (as.dat (“2018-12-28″))(c) unclass (as.D (2018-12-28))(d) unclass (as.Date (“2018-12-28″))I had been asked this question during an internship interview.This interesting question is from Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct ANSWER is (d) unclass (as.Date (“2018-12-28″))

Explanation: unclass returns (a COPY of) its argument with its class information REMOVED. Unclass with an object is to remove from a class or CATEGORY.



Discussion

No Comment Found

Related InterviewSolutions