Dear all, I'm writing a package where the main function fn(), say, returns a glm-like object, with three additional components.
obj<-glm(....) out<-fn(obj,....)
out is substantially an updated version of obj, with the same response and some (two or three) additional variables in the linear predictor. My problem is that out is much bigger than obj, and the three additional components don't seem responsible, as they are quite small.
class(obj)
[1] "glm" "lm"
class(out)
[1] "myclass" "glm" "lm"
object.size(obj)
[1] 1685228
object.size(out)
[1] 2701292 Why is out so larger than obj? the additional components are rather small and the remaining ones seem approximatevely the same. Many thanks, vito #the size of the additional components:
object.size(out$psi)
[1] 348
object.size(out$it)
[1] 36
object.size(out$epsilon)
[1] 36 #the size of some remaining component:
all.equal(out$y,obj$y)
[1] TRUE
object.size(obj$R)
[1] 9284
object.size(out$R)
[1] 10356
object.size(obj$coef)
[1] 1024
object.size(out$coef)
[1] 1064
object.size(obj$call)
[1] 1456
object.size(out$call)
[1] 764 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._