Skip to content
Prev 4320 / 63421 Next

classed

I've often wondered about this. Any comments from someone who really knows the
internals of R? When I first implemented it I did some testing and didn't notice
any really big slowdown and I do use a lot of fairly big (multi MB size)
objects. But notice that the difference is really in the function call, not in
the copying of objects. A function using classed would end

  classed(x, "whatever") }

rather than

 class(x) <- "whatever"
 x}

I think the copy is (or is not) made in both cases.

Paul Gilbert



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._