Just one further point. If you do run out of memory using #2 then try
this which is the same as #2 but adds a dbname argument to force the
computation to be done from disk rather than memory.
sqldf("select d1.x - d2.x, count(*) from d1, d2 group by d1.x - d2.x",
dbname = tempfile())
On Mon, Feb 1
actual code.
Regards,
Moshe.
--- On Tue, 16/2/10, Jonathan wrote:
> From: Jonathan
> Subject: Re: [R] difftimes; histogram; memory problems
> To: "r-help"
> Received: Tuesday, 16 February, 2010, 1:17 PM
> Let me fix a couple of typos in that
> email:
>
>
Here are two approaches to try:
> # test data
> d1 <- data.frame(x = Sys.Date() + 1:3)
> d2 <- data.frame(x = Sys.Date() - 1:3)
> # 1. you might not have enough memory for this but its short
> table(outer(1:3, -(1:3), "-"))
2 3 4 5 6
1 2 3 2 1
> # 2. this one performs all the operations outsid
Let me fix a couple of typos in that email:
Hi All:
Let's say I have two dataframes (Condition1 and Condition2); each
being on the order of 12,000 and 16,000 rows; 1 column. The entries
contain dates.
I'd like to calculate, for each possible pair of dates (that is:
Condition1[1:12,000] and Cond
4 matches
Mail list logo