check data types in r code example
Example 1: check type of column in r
#in R
sapply(my.data, class)
Example 2: r type of all columns
sapply(my.data, class)
y x1 x2 X3
"numeric" "integer" "logical" "factor"
#in R
sapply(my.data, class)
sapply(my.data, class)
y x1 x2 X3
"numeric" "integer" "logical" "factor"