Learn R Programming

pcutils (version 0.2.8)

change_fac_lev: Change factor levels

Description

Change factor levels

Usage

change_fac_lev(x, levels = NULL, last = FALSE)

Value

factor

Arguments

x

vector

levels

custom levels

last

put the custom levels to the last

Examples

Run this code
change_fac_lev(letters[1:5], levels = c("c", "a"))

Run the code above in your browser using DataLab