Skip to content
Prev 22892 / 63424 Next

c.factor

On Tue, 2006-11-14 at 11:51 -0600, Marc Schwartz wrote:
That last line can even be cleaned up, as I was doing something else
initially:

c.factor <- function(...)
{
  args <- list(...)

  if (!all(sapply(args, is.factor)))
   stop("All arguments must be factors")

  factor(unlist(lapply(args, as.character)))
}


Marc