r get type of column code example
Example: r type of all columns
sapply(my.data, class)
y x1 x2 X3
"numeric" "integer" "logical" "factor"
sapply(my.data, class)
y x1 x2 X3
"numeric" "integer" "logical" "factor"