makecategorical: makecategorical - converts given variables into categorical...

Description Usage Arguments Value Examples

View source: R/cpuefuncs.r

Description

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 the non factored variables can be retained.

Usage

1
makecategorical(labelModel, indat)

Arguments

labelModel

is the set of variables from the data.frame that are to be converted into categorical factors.

indat

is the data.frame that is to be analysed in the standardization

Value

a copy of the database with the selected variables converted into factors

Examples

1
2
3
4
5
6
## Not run: 
data(sps)
labelM <- c("Year","Vessel","Month")
sps1 <- makecategorical(labelM,sps)

## End(Not run)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.