[R] Date time Differences

Gabor Grothendieck ggrothendieck at myway.com
Fri Nov 19 04:40:03 CET 2004


Mark R Laflamme, MD <mlaflamme <at> regenstrief.org> writes:

: 
: Greetings from an R newbie
: 
: Table imported with 4 columns containing Dates and Times, I desire to 
: determine the differences between said columns
: Have loaded the base and chron packages for R commander.  Have tried to 
: use format but without success.  Have tried the Postix commands but 
: error states "unused argument (s) (...)", even though some of the 
: examples do not use (...) at the end of the command
: 
: Example:
: Table is named GvY1
:       Operation.Time.End      Operation.Time.Dictated   
: Operation.Time.Verfiy
:        7/10/2004 10:10:12         7/12/2004 9:18:03                  
: 7/28/2004 05:00:02
: 
: Information is mm/dd/year hh:mm:ss (time of day, e.g. the first column 
: is July 10th 2004 10:10 AM at 12 seconds)
: What is the best way to get the difference between any of the 2 columns? 
: And eventually test statistics on the columns (eg. P values, if needed, 
: but not a priority at this time)
: Thanks in advance
: 
: Platform WinXP
: IBM T40p
: R v 1.8.1
: R commander
: 


Often problems with data frames are due to storing the data
as factors rather than in a datetime class but without a 
reproduceable example its impossible to know for sure.  You might 
be able to solve this yourself by reading the article on dates and 
times in R News 4/1.




More information about the R-help mailing list