var_type {staccuracy} | R Documentation |
Determine the datatype of a vector
var_type(var)
var |
vector whose datatype is to be determined Not exported. See @returns for details of what it does. |
Returns generic datatypes of R basic vectors according to the following mapping:
logical
returns 'binary'
numeric
values (e.g., integer
and double
) return 'numeric'
However, if the only values of numeric are 0 and 1, then it returns 'binary'
unordered factor
returns 'categorical'
ordered
factor
returns 'ordinal'