Re: [R] Computing row differences in new columns

2011-03-21 Thread Henrique Dallazuanna
Roberto Lodeiro Muller wrote: > > -Original Message- > From: Roberto Lodeiro Muller > To: roberto.mul...@doctor.com > Sent: Mon, Mar 21, 2011 3:37 pm > Subject: Re: [R] Computing row differences in new columns > > > Sorry, my data appeared badly formatted to me,

Re: [R] Computing row differences in new columns

2011-03-21 Thread David Winsemius
On Mar 21, 2011, at 3:38 PM, Roberto Lodeiro Muller wrote: -Original Message- From: Roberto Lodeiro Muller To: roberto.mul...@doctor.com Sent: Mon, Mar 21, 2011 3:37 pm Subject: Re: [R] Computing row differences in new columns Sorry, my data appeared badly formatted to me, so I

Re: [R] Computing row differences in new columns

2011-03-21 Thread Dennis Murphy
iginal Message- > From: Roberto Lodeiro Muller > To: roberto.mul...@doctor.com > Sent: Mon, Mar 21, 2011 3:37 pm > Subject: Re: [R] Computing row differences in new columns > > > Sorry, my data appeared badly formatted to me, so I converted it to plain > text: > > An

Re: [R] Computing row differences in new columns

2011-03-21 Thread Alexander Engelhardt
tenumber[i+1] } where datenumber is your integer column of the date. -- Alex Am 21.03.2011 20:38, schrieb Roberto Lodeiro Muller: -Original Message- From: Roberto Lodeiro Muller To: roberto.mul...@doctor.com Sent: Mon, Mar 21, 2011 3:37 pm Subject: Re: [R] Computing row differences in

Re: [R] Computing row differences in new columns

2011-03-21 Thread Roberto Lodeiro Muller
-Original Message- From: Roberto Lodeiro Muller To: roberto.mul...@doctor.com Sent: Mon, Mar 21, 2011 3:37 pm Subject: Re: [R] Computing row differences in new columns Sorry, my data appeared badly formatted to me, so I converted it to plain text: And just to clarify, for each

[R] Computing row differences in new columns

2011-03-21 Thread Roberto Lodeiro Muller
Hi I have the following columns with dates and results, sorted by subject and date. I'd like to compute the differences in dates and results for each patient, based on the previous row. Obviously the last entry for each subject should be a NA. Which would be the best way to accomplished tha