casting: Cast columns to a specified data type

Description Usage Arguments Value Examples

Description

Cast columns to a specified data type

Usage

1
2
3
4
5

Arguments

.data

a table of data.

...

A selection of columns.

Value

a data frame.

Examples

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)

hacksaw documentation built on Jan. 13, 2021, 7:57 a.m.