logical2factor: Convert logical vector into factor

View source: R/tally.R

logical2factorR Documentation

Convert logical vector into factor


Turn logicals into factors with levels ordered with TRUE before FALSE. Other inputs are returned unaltered.


logical2factor(x, ...)

## Default S3 method:
logical2factor(x, ...)

## S3 method for class 'data.frame'
logical2factor(x, ...)



a vector or data frame


additional arguments (currently ignored)


If x is a vector either x or the result of converting x into a factor with levels TRUE and FALSE (in that order); if x is a data frame, a data frame with all logicals converted to factors in this manner.

mosaicCore documentation built on Nov. 5, 2023, 9:06 a.m.