fac2num: Convert a factor to numeric

View source: R/fac2num.R

fac2numR Documentation

Convert a factor to numeric

Description

Convert a factor with numeric levels to a non-factor

Usage

fac2num(x)

Arguments

x

A vector containing a factor with numeric levels

Value

The input factor made a numeric vector

Examples

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


broman documentation built on May 29, 2024, 7:18 a.m.

Related to fac2num in broman...