as.fumeric: converts to factor and then numeric

View source: R/as.fumeric.R

as.fumericR Documentation

converts to factor and then numeric

Description

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

Usage

as.fumeric(x, levels = unique(x))

Arguments

x

a character vector

levels

the leves to be used in the call to factor

Author(s)

Rafael A. Irizarry

Examples


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


rafalib documentation built on April 11, 2025, 5:51 p.m.

Related to as.fumeric in rafalib...