Message-ID: <152481.2929.qm@web36103.mail.mud.yahoo.com>
Date: 2009-05-26T21:52:36Z
From: Tim Clark
Subject: Problem with fractional seconds
Dear List,
I am having problems converting a file with fractional seconds to class POSIXct. I have set my options to include digits.secs and my format to just time, but my output is the current date with my time lacking the fractions of a second. For example:
options(digits.secs=3)
t<-c("06:00:00.100","06:00:01.231")
myt<-as.POSIXct(t,format="%H:%M:%S")
myt
[1] "2009-05-26 06:00:00 HST" "2009-05-26 06:00:01 HST"
I would like the output to be just time with fractional seconds. I.e.
06:00:00.100,06:00:01.231
I have also tried Chron times() which did not work either. Interestingly, Sys.time() does produce fractional seconds, so I know the options are working.
I would appreciate your help and suggestions.
Aloha,
Tim
Tim Clark
Department of Zoology
University of Hawaii