R/as.factor.lfactor.R

# Rd in man, not roxygen
#' @export
as.factor.lfactor <- function(x) {
  class(x) <- "factor"
  attr(x, "llevels") <- NULL
  x
}

methods::setGeneric("as.factor")
methods::setMethod("as.factor", methods::signature(x="lfactor"), as.factor.lfactor)

Try the lfactors package in your browser

Any scripts or data that you put into this service are public.

lfactors documentation built on May 2, 2019, 8:29 a.m.