[R] time difference

David Huffer David.Huffer at csosa.gov
Wed Jul 22 17:20:42 CEST 2009


On Wednesday, July 22, 2009 10:44 AM, Erin Hodgess wrote:

 > ...I am looking at the  ctime  attribute  of
 > two  different  files. It contains the year,
 > month, day, time of creation and time  zone.
 > Is  there  a way to determine the difference
 > between the ctimes of two files, please...

are you looking for something different from

   > file1 <- file.info ( '~/Desktop/file1.txt' ) $ ctime
   > file1
   [1] "2009-07-20 16:35:17 EDT"
   > file2 <- file.info ( '~/Desktop/file2.txt' ) $ ctime
   > file2
   [1] "2009-02-12 18:58:47 EST"
   > file1 - file2
   Time difference of 157.8587 days
   >

David

--
 David
 
 -----------------------------------------------------
 David Huffer, Ph.D.               Senior Statistician
 CSOSA/Washington, DC           david.huffer at csosa.gov




More information about the R-help mailing list