Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

r function to get class of all columns

> foo <- data.frame(c("a", "b"), c(1, 2))
> names(foo) <- c("SomeFactor", "SomeNumeric")
> lapply(foo, class)
$SomeFactor
[1] "factor"

$SomeNumeric
[1] "numeric"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function #class #columns
ADD COMMENT
Topic
Name
3+3 =