defac: Convert a factor to a character string safely

Description Usage Arguments Value Author(s) See Also Examples

View source: R/defac.R

Description

This is a shortcut function to convert a factor to a character variable without having to type as.character()

Usage

1
defac(x)

Arguments

x

a factor to be turned into a character

Value

A character

Author(s)

Jared E. Knowles

See Also

factor, levels to understand the R implementation of factors.

Examples

1
2
3
4
a <- as.factor(LETTERS)
summary(a)
b <- defac(a)
class(b)

eeptools documentation built on May 3, 2020, 1:05 a.m.