Description Usage Arguments Value Examples
get the class for each column in data, as a named character vector
1 | attribute_class(data, .checkAssertions = TRUE)
|
data |
a data frame or tibble type object |
.checkAssertions |
private variable used to check function assertions (if first in chain) |
a character vector of the class type of each column
1 2 3 4 5 6 7 | chr.ex <- sample(c('a','b','c'), 100, TRUE)
int.ex <- sample(c(1,2,3), 100, TRUE)
dttm.ex <- sample(as.Date.character(paste('2020-01-', 1:30, sep='')), 100, TRUE)
sample.data <- data.frame('chr'=chr.ex, 'int'=int.ex, 'dttm'=dttm.ex)
# get data classes for all columns
attribute_class(sample.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.