Learn R Programming

dataMaid (version 1.4.2)

refCat: summaryFunction that finds reference level for factor variables

Description

A summaryFunction, intended to be called from summarize, which returns the reference level of a factor variable, i.e. the first category as returned by levels(v). This level will serve as the reference category and get absorbed into the intercept for most standard model fitting procedures and therefore, it may be convenient to know.

Usage

refCat(v, ...)

Value

An object of class summaryResult with the following entries: $feature

("Reference level"), $result (the reference level of v), and $value

(identical to result).

Arguments

v

A variable (vector) of type factor.

...

Not in use.

See Also

summaryFunction, summarize, summaryResult, allSummaryFunctions

Examples

Run this code
refCat(factor(letters))

Run the code above in your browser using DataLab