refactor_variable: Change the levels of a factor to use an explicit list

Description Usage Arguments Value

View source: R/refactor_variables.R

Description

Change the levels of a factor to use an explicit list

Usage

1
2
3
4
5
refactor_variable(
  this.data,
  this.var,
  these.levels = c("Yes", "No", "Missing")
)

Arguments

this.data

The tibble in which the column exists

this.var

The column name to refactor

these.levels

The new levels for this factor (default = Yes, No, Missing)

Value

The updated tibble


LisaHopcroft/CTutils documentation built on Oct. 7, 2021, 11:08 p.m.