Learn R Programming

questionr (version 0.4.3)

irec: 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(dfobject, oldvar)

Arguments

dfobject
data frame to operate on, as an object or a character string
oldvar
name of the variable 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 console when the app is closed with the "Done" button.

Examples

Run this code
data(hdv2003)
irec(hdv2003, "qualif")
irec(hdv2003, sexe) ## this also works

Run the code above in your browser using DataLab