factorize: Factorize

Description Usage Arguments Value Note See Also Examples

Description

Coerce all columns in the object to factor (i.e. stringsAsFactors).

Usage

1
2
3
4
factorize(object, ...)

## S4 method for signature 'DataFrame'
factorize(object)

Arguments

object

Object.

...

Additional arguments.

Value

Modified object. All columns will be coerced to factor.

Note

Updated 2019-07-19.

See Also

encode() for run-length encoding (Rle) approach.

Examples

1
2
df <- S4Vectors::DataFrame(a = letters[seq_len(5L)], b = seq_len(5L))
x <- factorize(df)

acidgenomics/transformer documentation built on Jan. 9, 2020, 11:34 a.m.