abbreviate_factor: Abbreviate a factor.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/abbreviate_factor.R

Description

Calls the base::abbreviate() function on a factor, and returns a new factor with abbreviated level values.

Usage

1
abbreviate_factor(x, n = 1e+09)

Arguments

x

factor

n

numeric positive integer passed to abbreviate().

Value

a factor

Author(s)

Bill Forrest forrest@gene.com

See Also

factor

Examples

1
2
   x <- factor( c( 'catttt', 'dogggg', 'catttt' ) )
   out <- maeve:::abbreviate_factor( x, n = 3 )

wfforrest/maeve documentation built on Jan. 1, 2021, 12:47 p.m.