as.fumeric: converts to factor and then numeric

Description Usage Arguments Author(s) Examples

View source: R/as.fumeric.R

Description

Converts a vector of characters into factors and then converts these into numeric.

Usage

1

Arguments

x

a character vector

levels

the leves to be used in the call to factor

Author(s)

Rafael A. Irizarry

Examples

1
2
group = c("a","a","b","b")
plot(seq_along(group),col=as.fumeric(group))

ririzarr/rafalib documentation built on April 17, 2021, 8:56 p.m.