You can check the type of a variable by using the gettype() function . Just pass in the variable whose type you want to test and get the variable’s type as a string. The $var variable initially has a type of null , because it has been created but not initialized by assigning a value.
Read moreHow do you check the type of an object in R?
R – type of To get type of a value or variable or object in R programming, call typeof() function and pass the value/variable to it .
Read moreHow do I know what type of object?
To learn how to check object type, follow these four steps.
Read more