fct_to_num: Convert a factor variable with numeric levels to a numeric...

View source: R/fct_to_num.R

fct_to_numR Documentation

Convert a factor variable with numeric levels to a numeric variable

Description

Convert a factor variable with numeric levels to a numeric variable

Usage

fct_to_num(f)

Arguments

f

A factor variable with numeric levels

Value

A numeric variable

Examples

var <- factor(c("1", "2", "3"))
fct_to_num(var)

pstraforelli/forcatsmisc documentation built on March 19, 2022, 7:17 a.m.