View source: R/variable_types.R
variable_types | R Documentation |
Get classes of selected columns from dataset
variable_types(data, columns = NULL)
data |
( |
columns |
( |
Character vector of classes of columns
from provided data
.
# use non-exported function from teal.slice
variable_types <- getFromNamespace("variable_types", "teal.slice")
variable_types(
data.frame(
x = 1:3, y = factor(c("a", "b", "a")), z = c("h1", "h2", "h3"),
stringsAsFactors = FALSE
),
"x"
)
variable_types(
data.frame(
x = 1:3, y = factor(c("a", "b", "a")), z = c("h1", "h2", "h3"),
stringsAsFactors = FALSE
),
c("x", "z")
)
variable_types(
data.frame(
x = 1:3, y = factor(c("a", "b", "a")), z = c("h1", "h2", "h3"),
stringsAsFactors = FALSE
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.