factor_to_num: Convert a Factor to Numeric

Description Usage Arguments Value Examples

View source: R/factor_to_numeric.R

Description

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

Usage

1

Arguments

x

A vector containing a factor with numeric levels.

Value

The input factor made into a numeric vector.

Examples

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

nima documentation built on March 13, 2020, 2:10 a.m.

Related to factor_to_num in nima...