irec: Interactive recoding

View source: R/irec.R

irecR Documentation

Interactive recoding

Description

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

Usage

irec(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)

Value

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

Examples

## Not run: 
data(hdv2003)
irec()
v <- sample(c("Red", "Green", "Blue"), 50, replace = TRUE)
irec(v)
irec(hdv2003, "qualif")
irec(hdv2003, sexe) ## this also works

## End(Not run)

juba/questionr documentation built on Feb. 4, 2023, 11:45 p.m.