Learn R Programming

GDAtools (version 2.1)

ijunk: App for junk categories of specific MCA

Description

This function launches a shiny app to define interactively the junk categories before a specific MCA.

Usage

ijunk(data, init_junk = NULL)

Value

A character vector of junk categories

Arguments

data

data frame of categorical variables to be used as active in a specific MCA

init_junk

optional vector of junk categories. Can be a numeric vector indicating the indexes of the junk categories or a character vector of junk categories, specified in the form "namevariable.namecategory" (for instance "gender.male"). Default is NULL.

Author

Nicolas Robette

Details

Once the selection of junk categories is interactively done, the function provides the code to use in a script. It also offer the opportunity to select a set of junk categories at once by writing the common suffix of these categories.

See Also

speMCA, csMCA, getindexcat

Examples

Run this code
if (FALSE) {
data(Music)
ijunk(Music[,1:5])
# or
junk <- ijunk(Music[,1:5])
# To update an existing vector of junk categories
junk <- ijunk(Music[,1:5], init_junk = c("Rock.NA", "Rap.NA"))
# and then
mca <- speMCA(Music[,1:5], excl = junk)
}

Run the code above in your browser using DataLab