What function is used to check the type of a variable in R?

What function is used to check the type of a variable in R?

a) class()
b) typeof()
c) checktype()
d) vartype()

Answer:

a) class()

Explanation:

The class() function returns the class of the variable in R, helping you identify its type.

Scroll to Top