as_numeric {radiant.data}R Documentation

Convert variable to numeric avoiding potential issues with factors

Description

Convert variable to numeric avoiding potential issues with factors

Usage

as_numeric(x)

Arguments

x

Input variable

Value

Numeric

Examples

as_numeric(rnorm(10))
as_numeric(letters)
as_numeric(as.factor(5:10))
as.numeric(as.factor(5:10))
as_numeric(c("a", "b"))
as_numeric(c("3", "4"))
as_numeric(as.factor(c("3", "4")))


[Package radiant.data version 1.6.6 Index]