what is the number variable in the "email" data frame? in r

To find the number variable in the "email" data frame, you can use the sapply() function which returns a vector that lists the variable types of each column. The code step to do this is as follows:

main.r
# assuming your data frame is called "email"
sapply(email, class)
66 chars
3 lines

This will return a character vector of variable classes for each column in the data frame. You can then identify which one is numeric.

related categories

gistlibby LogSnag