On Thu, May 20, 2004 at 03:52:22PM -0500, Kenneth Cabrera wrote:
> Hi dear R-users:
> 
> I have the following problem:
> I have a list of data.frames (12 variables and 60000 rows, each)
> 
> I have to merge from an specific point of the list to the
> end of the list, I am doing so with a for() loop but it is
> too inefficient and it exhausts memory.
> 
> How can I convert this for() loop in a function and then use
> lapply?

There's still a better way to do it, I'm sure, but something
like...

##untested!

myMerge <- function(x,y,...) {
        zz <- merge(x,y,...)
        gc()
}

foo <- lapply(my.df.list[[-1]],myMerge,my.df.list[[1]])

Cheers

Jason
-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
[EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to