get_col_types | R Documentation |
This function returns the primary class/type of each column in a data frame or tibble. Additionally, it can print a summary of the column types.
get_col_types(df, print_it = TRUE)
df |
A data frame or tibble whose column types are to be extracted. |
print_it |
Logical; if |
A named character vector where names are column names and the values are their respective primary types.
df <- data.frame(a = 1:3, b = c("A", "B", "C"), c = factor(c("X", "Y", "X")))
get_col_types(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.