Determine the datatype of a vector
Value
Returns generic datatypes of R basic vectors according to the following mapping:
logical
returns 'binary'numeric
values (e.g.,integer
anddouble
) 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'