R/expand.R

Defines functions fct_expand

Documented in fct_expand

fct_expand <- function(f, ...) {
  f <- check_factor(f)

  new_levels <- chr(...)
  lvls_expand(f, union(levels(f), new_levels))
}
sindribaldur/poorcats documentation built on Feb. 26, 2021, 12:27 a.m.