fac2num: Convert a factor to numeric

Description Usage Arguments Value References Examples

Description

Convert a factor with numeric levels to a non-factor. This was stolen from Karl Broman, and just put in this package for convenience.

Usage

1

Arguments

x

A vector containing a factor with numeric levels

Value

The input factor made a numeric vector

References

from package kbroman

Examples

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

patr1ckm/patr1ckm documentation built on May 24, 2019, 8:21 p.m.