Description Usage Arguments Value Examples
Cast columns to a specified data type
1 2 3 4 5 | cast_character(.data, ...)
cast_numeric(.data, ...)
cast_logical(.data, ...)
|
.data |
a table of data. |
... |
A selection of columns. |
a data frame.
1 2 3 4 5 | library(dplyr)
df <- tibble(x = 1:3, y = as.character(1:3), z = c(0, 0, 1))
df %>% cast_character(x)
df %>% cast_numeric(y)
df %>% cast_logical(z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.