factor_conversion: Convert factor with numeric labels into numeric vector

Description Usage Arguments Author(s) Examples

Description

Convert factor with numeric labels into numeric vector

Usage

1

Arguments

x

a factor with numeric labels

Author(s)

Ulrike Gr<c3><b6>mping, groemping@beuth-hochschule.de

Examples

1
2
3
4
5
6
7
8
9
 x <- factor(c(11, 22, 33, 99))
 as.numeric(x)
 # 1 2 3 4   # NOT typically the desired.expected output

 f.as.numeric(x)
 # 11 22 33 99  # Typically desired output

 # Or...
 as.numeric(as.character(x)) # A tad unsightly

roperators documentation built on May 1, 2019, 6:27 p.m.