An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111007/65699316/attachment.pl>
Handling Time in R
9 messages · Alaios, jim holtman, Jeff Newmiller
?ISOdatetime
x <- ISOdatetime(2011,10,6,16,23,30.539) str(x)
POSIXct[1:1], format: "2011-10-06 16:23:30"
y <- ISOdatetime(2011,10,6,16,23,30.939) difftime(y,x)
Time difference of 0.3999999 secs
On Fri, Oct 7, 2011 at 11:04 AM, Alaios <alaios at yahoo.com> wrote:
Dear all, I would like to ask your help regarding handling time stamps in R. I think first I need a reference to read about their logic and how I should handle them. For example, this is a struct I have str(MyStruct$TimeStamps) ?num [1:100, 1:6] 2011 2011 2011 2011 2011 ... MyStruct$TimeStamps[1,] [1] 2011.000?? 10.000??? 6.000?? 16.000?? 23.000?? 30.539 the last field contains seconds.milliseconds. How I can for example make calculations with time stamps like see if the MyStruct$TimeStamps[1,]-MyStruct$TimeStamps[2,] differ more than 300millisecond, or 3 days have passed? I would like to thank you in advance for your suggestions B.R Alex ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Jim Holtman Data Munger Guru What is the problem that you are trying to solve?
2 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111009/8459140f/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/35efe63c/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/b5e01c1f/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/f2874bf3/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/fcb52c82/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/ba015ac7/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111010/9ad60da3/attachment.pl>