return data types of columns 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"