iorder: Interactive reordering of factor levels

View source: R/iorder.R

iorderR Documentation

Interactive reordering of factor levels

Description

This function launches a shiny app in a web browser in order to do interactive reordering of the levels of a categorical variable (character or factor).

Usage

iorder(obj = NULL, var_name = NULL)

Arguments

obj

vector to recode or data frame to operate on

var_name

if obj is a data frame, name of the column to be recoded, as a character string possibly without quotes)

Details

The generated convert the variable into a factor, as only those allow for levels ordering.

Value

The function launches a shiny app in the system web browser. The reordering code is returned in he console when the app is closed with the "Done" button.

Examples

## Not run: 
data(hdv2003)
iorder(hdv2003, "qualif")

## End(Not run)

questionr documentation built on Feb. 16, 2023, 10:14 p.m.