colClasses | R Documentation |
Coerces data.frame columns to the specified classes
colClasses(d, colClasses)
d |
A data.frame. |
colClasses |
A vector of column attributes, one of: numeric, factor, character, etc. |
dat <- data.frame(xvar = seq(1:10), yvar = rep(c("a","b"),5)) # make a data.frame str(dat) str(colClasses(dat, c("factor","factor")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.