Le jeudi 17 novembre 2011 à 21:34 -0500, R. Michael Weylandt a écrit : > Hi Josh, > > You're absolutely right. I suppose one could set up some sort of S3 > thing for Henri's problem: > > c <- function(..., recursive = FALSE) UseMethod("c") > c.default <- base::c > c.corpus <- function(..., recursive = FALSE) {ans = c.default(...); > attributes(ans) <- c(do.call(attributes, ...))} > > But agreed, it seems deeply risky. This method already exists in the tm package where the Corpus class comes from. Henri-Paul, see ?c.Corpus.
Specifically, tot.corpus <- c(corpus.1, corpus.2, recursive=TRUE) meta(tot.corpus) works. It looks weird that recursive=TRUE isn't the default, but the documentation seems to imply that the merging of meta-data might produce weird results, so that's probably why it's disabled by default. You may want to get in touch with Ingo Feinerer about that. Regards ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.