refCat {dataMaid} | R Documentation |
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, ...)
Arguments
v |
A variable (vector) of type factor. |
... |
Not in use. |
Value
An object of class summaryResult
with the following entries: $feature
("Reference level"), $result
(the reference level of v
), and $value
(identical to result).
See Also
summaryFunction
, summarize
, summaryResult
,
allSummaryFunctions
Examples
refCat(factor(letters))
[Package dataMaid version 1.4.1 Index]