dropCoarseLevels: Remove Coarse Levels from a Coarsened Factor
Description
A coarsened factor, produced by the function coarsened,
has two types of levels: base levels, to represent observations that
are fully known, and coarse levels, to represent observations that are
partially or completely missing. The function dropCoarseLevels
converts a coarsened factor to a factor or ordered factor by
removing all of the coarse levels and setting the
corresponding observations to NA.
Usage
dropCoarseLevels(x)
Value
A factor or ordered factor, obtained by removing the coarse levels of
x and setting the observations in those levels to NA.
If x is a factor but not a coarsened factor, then it is
returned unchanged.
If the only coarse level of x is NA, then no information
is lost when dropCoarseLevels is applied. If x has
other non-empty coarse levels, then the partial information carried by
those observations is effectively discarded.
References
For more information about coarsened factors in the cvam
package, see the vignette Understanding Coarsened Factors in cvam.