fnumeric converts factors to numeric data ignoring the levels

fnumeric(x)

Arguments

x

Factor.

Value

Numeric.

Warning

I recommend always to double-check after recoding.

Examples

a <- as.factor(c('2','4','6')) as.numeric(a)
#> [1] 1 2 3
fnumeric(a)
#> [1] 2 4 6