It would be very useful if all "as.*" functions were generic, so that a user who creates a new class can write methods to coerce objects of that class to standard R objects. In fact, most of the "as.*" functions are generic, but there are a few that aren't: as.array as.factor as.ordered as.pairlist as.formula as.ts It's actually "as.array" and "as.ts" that are a problem for me, but I mention the others because this seems like a good general principle. Martyn -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> Martyn Plummer writes:> It would be very useful if all "as.*" functions were generic, > so that a user who creates a new class can write methods to > coerce objects of that class to standard R objects.> In fact, most of the "as.*" functions are generic, but there > are a few that aren't: > as.array > as.factor > as.ordered > as.pairlist > as.formula > as.ts> It's actually "as.array" and "as.ts" that are a problem for > me, but I mention the others because this seems like a good > general principle.This may be a good idea. -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Is a ts of length one a ts? (PR#245)
- Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)
- Matrices given to pt? [was: [R] for loops and counters]
- 答复: how can I know the version of my zlib checked by R
- R-alpha: Problems with dimnames and names