Converts all factor variables in a dataframe to character variables

Share:

Description

Converts all factor variables in a dataframe to character variables

Usage

1

Arguments

dframe

A dataframe

Value

The same dataframe with the factor variables converted to character variables.

Author(s)

Landon Sego

Examples

1
2
3
4
x <- data.frame(a=factor(c(rep(1,4),rep(2,4),rep(3,4))), y=rnorm(12))
str(x)
x <- factor2character(x)
str(x)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.