Learn R Programming

radiant.data (version 0.6.0)

as_integer: Convert variable to integer avoiding potential issues with factors

Description

Convert variable to integer avoiding potential issues with factors

Usage

as_integer(x)

Arguments

x
Input variable

Value

Integer

Examples

Run this code
as_integer(rnorm(10))
as_integer(letters)
as_integer(5:10 %>% as.factor)
as.integer(5:10 %>% as.factor)

Run the code above in your browser using DataLab