Some packages append non-base classes to data frame columns, e.g.
if data is labeled with the Hmisc
package the class of a string will
be c("labelled", "character")
rather than c("character")
only. This
simple function extracts the base R class.
1 | assign_class(data, variable)
|
data |
data frame |
variable |
string vector of column names from data |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.