Function to quick mutate columns to factor.

to_factor(.data, ...)

Arguments

.data

A data frame

...

The variable(s) to encode to a factor.

Value

An object of the same class of .data with the variables in ... encoded to a factor.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{ library(metan) PH_EH_to_factor <- to_factor(data_ge2, PH, EH) PH_EH_to_factor <- to_factor(data_ge2, 4:5) # }