[R] Indexing from two variables

2011-02-02 Thread dunner
Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes rec and book Each row in book needs to be pasted onto the end of several of the rows of rec according to two variables in the row: MRN and

Re: [R] Indexing from two variables

2011-02-02 Thread Ista Zahn
Hard to know exactly without seeing the structrure of rec and book, but I would start with ?merge Best, Ista On Wed, Feb 2, 2011 at 2:06 PM, dunner ross.du...@tcd.ie wrote: Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for

[R] Indexing from two variables

2011-02-02 Thread Ross Dunne
Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes rec and book Each row in book needs to be pasted onto the end of several of the rows of rec according to two variables in the row: MRN and

Re: [R] Indexing from two variables

2011-02-02 Thread Sarah Goslee
That's kind of hard to follow without example data, but have you looked at merge() ? On Wed, Feb 2, 2011 at 1:31 PM, Ross Dunne dunn...@tcd.ie wrote: Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have