metan (version 1.2.1)

to_factor: Encode variables to a factor

Description

Function to quick mutate columns to factor.

Usage

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.

Examples

Run this code
# NOT RUN {
library(metan)
PH_EH_to_factor <- to_factor(data_ge2, PH, EH)
PH_EH_to_factor <- to_factor(data_ge2, 4:5)

# }

Run the code above in your browser using DataLab