makecategorical | R Documentation |
makecategorical given a list of variables, as character strings, this function converts each variable into a factor after checking no mistake has been made with the spelling of the variable name. A copy of the data is made so that any non-categorical variables can be retained. Any interaction terms included must be last in the vector making up labelModel
makecategorical(labelModel, indat)
labelModel |
is the set of variables/column names from the data.frame that are to be converted into categorical factors. Any interaction terms should come last. |
indat |
is the data.frame that is to be analysed in the standardization |
a copy of the database with the selected variables converted into factors
## Not run:
data(abeg)
labelM <- c("year","diver","month")
ab1 <- makecategorical(labelM,abeg)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.