Re: [R] Subtracting POSIXct data/times

2010-06-14 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of James Rome > Sent: Monday, June 14, 2010 2:27 PM > To: Don MacQueen > Cc: r-help@r-project.org > Subject: Re: [R] Subtracting POSIXct data/times > >

Re: [R] Subtracting POSIXct data/times

2010-06-14 Thread James Rome
That fixed it. Dumb me. I had assumed that the subtraction of the raw POSIXcts would always give the same results. Thanks, Jim On 6/14/10 5:22 PM, Don MacQueen wrote: > See the help page for the difftime() function, which will tell you how > to specify the units of the differences. > (when you do

Re: [R] Subtracting POSIXct data/times

2010-06-14 Thread Don MacQueen
See the help page for the difftime() function, which will tell you how to specify the units of the differences. (when you don't specify, it chooses the units according to some rules) -Don At 4:24 PM -0400 6/14/10, James Rome wrote: I have two dataframe columns of POXIXct data/times that includ

[R] Subtracting POSIXct data/times

2010-06-14 Thread James Rome
I have two dataframe columns of POXIXct data/times that include seconds. I got them into this format using for example zsort$ETA <- as.POSIXct(as.character(zsort$ETA), format="%m/%d/%Y %H:%M:%S") My problem is that when I subtract the two columns, sometimes the difference is given in seconds, and