fac2char: Convert any vectors of factors in a data.frame or list to...

Description Usage Arguments Value Author(s) Examples

View source: R/fac2char.R

Description

Converts the factors in lists and data.frames to character. In lists this operates only at the top level (not whole trees in nested lists). This is generally done because characters are easier to work with.

Usage

1

Arguments

df

data.frame (or list) containing factors

Value

Returns a data.frame or list (depending on what was supplied) where all factors have been converted to characters.

Author(s)

Aaron Hayman

Examples

1
2
3
d=data.frame(a=1:5,b=letters[5:1])
str(d)
str(fac2char(d))

jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.