Re: [R] Programming R to avoid loops

2015-04-18 Thread Jeff Newmiller
Oh, great. An app [1] that introduces "me too" emails with a click and uses HTML to tell us all about it. Jim, this is probably not a good place to use that function. Read the posting guide about mailing list nettiquette. [1] http://readwrite.com/2013/06/05/new-boxer-ios-email-app-is-all-about-

Re: [R] Programming R to avoid loops

2015-04-18 Thread Jim Mankin
Jim Mankin liked your message with Boxer. On April 18, 2015 at 10:48:17 AM MST, Charles C. Berry wrote:On Sat, 18 Apr 2015, Brant Inman wrote:> I have two large data frames with the following structure:>>> df1> id date test1.result> 1 a 2009-08-28 1> 2 a 2009-09-16 1> 3 b 2008-08-06 0> 4 c 201

Re: [R] Programming R to avoid loops

2015-04-18 Thread Charles C. Berry
On Sat, 18 Apr 2015, Brant Inman wrote: I have two large data frames with the following structure: df1 id date test1.result 1 a 2009-08-28 1 2 a 2009-09-16 1 3 b 2008-08-06 0 4 c 2012-02-02 1 5 c 2010-08-03 1 6 c 2012-08-02 0 df2 id date te

Re: [R] Programming R to avoid loops

2015-04-18 Thread Jim Lemon
Hi Brant, I'm a bit confused about which data frame is the one to match to, but the following, while still including loops, should run much faster than the above as it only matches dates within id matches. df1<-read.table(text="id date test1.result a 2009-08-28 1 a 2009-09-16 1 b 2

[R] Programming R to avoid loops

2015-04-17 Thread Brant Inman
I have two large data frames with the following structure: > df1 id date test1.result 1 a 2009-08-28 1 2 a 2009-09-16 1 3 b 2008-08-06 0 4 c 2012-02-02 1 5 c 2010-08-03 1 6 c 2012-08-02 0 > df2 id date test2.result 1 a 2011-02-03 1 2 b 20