| r2lModifyClasses {r2lUniv} | R Documentation |
Given a list of classes (like one produced by r2lFindClasses),
the r2lModifyClasses function lets the user change some of the classes.
r2lModifyClasses(basicListClass, modification)
basicListClass |
A list of classes, usually produced by r2lFindClasses |
modification |
A list of classes, containing the classes to change. |
To set the basic class,
r2lFindClasses uses some rules. The user might decide to
accept r2lFindClasses choices for most columns, but not for
all. In this case, instead of setting the basic type one by one, he
can provide a modification list that will be used to correct some
of r2lFindClasses choices.
Note that the user does not really need to use this function: providing
directly the modification list to r2lUniv will have the same
effect since r2lUniv will use r2lModifyClasses on the
modification list.
A four-field list, like r2lFindClasses:
r2lUniv,
r2lUniv.data.frame,
r2lFindClasses,
r2lModifyClasses
# # # # # # # # # # # # # # # # # # #
# R to LaTeX, Univariate Analyses #
# Examples #
# r2lModifyClasses #
# # # # # # # # # # # # # # # # #
data(examCheating)
### Without modification in examCheating
(listClass <- r2lFindClasses(examCheating))
### We want Age to be treated as a continuous
changeInList <- list(continuous=c(2))
r2lModifyClasses(listClass,changeInList)
### ... and we also want some variables to be ordinal
changeInList <- list(continuous=c(2),ordinal=c(8:10,12))
r2lModifyClasses(listClass,changeInList)