factor_to_num {nima}R Documentation

Convert a Factor to Numeric

Description

Convert a factor with numeric levels to a non-factor (numeric).

Usage

factor_to_num(x)

Arguments

x

A vector containing a factor with numeric levels.

Value

The input factor made into a numeric vector.

Examples

x <- factor(c(3, 4, 9, 4, 9), levels = c(3, 4, 9))
factor_to_num(x)

[Package nima version 0.6.2 Index]