[Rd] Some memory questions: data.frame and lists.

2008-04-08 Thread Gopi Goswami
Hi there, I seek your expert opinion on the following memory related questions. The output below was gotten from R-2.6.2, compiled with --enable-memory-profiling on Ubuntu Linux. === >>> Code and output 1: > gc( ) us

[Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Gopi Goswami
data.frame( ) .Object }) ### Usage: nn <- 10 ## dd1 below could possibly be created by read.table or scan and data.frame dd1 <- data.frame(xx = rnorm(nn), yy = rnorm(nn)) dd2 <- new('DataFrame', data = dd1) rm(dd1) ## Now work with dd2 Thanks a lot, Gopi Goswami. PhD,

[Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Gopi Goswami
s in place' using the proposed S4 class DataFrame. Regards, Gopi Goswami. PhD, Statistics, 2005 http://gopi-goswami.net/index.html PS: zz <- seq_len(100) gc( ) dd <- data.frame(xx = zz) dd$yy <- zz gc( ) object.size(dd) #

[Rd] S4 helper functions: regular or generic?

2009-02-25 Thread Gopi Goswami
Hi there, I want to write helper functions for a base class, which will be used by its subclasses in the S4 world. This function ___will___ update certain slots of its argument object. Please help me decide which one of the following is a better approach with respect to coding style, memory usage

Re: [Rd] S4 helper functions: regular or generic?

2009-03-03 Thread Gopi Goswami
ived' class. Regards, gopi. On Wed, Feb 25, 2009 at 9:36 AM, Martin Morgan wrote: > Hi Gopi -- > > Gopi Goswami writes: > >> Hi there, >> >> >> I want to write helper functions for a base class, which will be used >> by its subclasses in the S4 wor