cast_character {hacksaw}R Documentation

Cast columns to a specified data type

Description

Cast columns to a specified data type

Usage

cast_character(.data, ...)

cast_numeric(.data, ...)

cast_logical(.data, ...)

Arguments

.data

a table of data.

...

A selection of columns.

Value

a data frame.

Examples

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)

[Package hacksaw version 0.0.2 Index]