Displaying 1 result from an estimated 1 matches for "banananana".
2010 Feb 04
4
Why is there no c.factor?
Hi all,
Is there are reason that there is no c.factor method? Analogous to
c.Date, I'd expect something like the following to be useful:
c.factor <- function(...) {
factors <- list(...)
levels <- unique(unlist(lapply(factors, levels)))
char <- unlist(lapply(factors, as.character))
factor(char, levels = levels)
}
c(factor("a"), factor("b"),