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)

nhejazi/nima documentation built on March 10, 2020, 1:10 a.m.