| column_class | R Documentation |
The column_class function takes two arguments,
.data, a data.frame object, and find_class, a single or
vector of character value(s) of the class type desired.
column_class(.data = NULL, find_class = NULL)
.data |
data.frame; a data.frame with named columns |
find_class |
string or string vector; a single or vector of string value(s) of column class types |
x <- data.frame(
col_a = as.factor(c("a", "b", "c"))
, col_b = as.integer(c(1, 2, 3))
, col_c = as.factor(c("apple", "banana", "citrus"))
, col_d = as.character(c("one", "two", "three"))
)
column_class(x, "factor")
column_class(x, c("integer", "character"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.