[R] time conversion from second to Y M D H M S format

2012-02-02 Thread uday
I have some time data and which is in seconds time -c( 126230400 126252000 126273600 126295200 126316800 126338400) now I wanted to convert this time to Y M D H M S format I have tried following codes but it does not give me the out put in Y M D H M S time_t1 - as.POSIXlt(time,

Re: [R] time conversion from second to Y M D H M S format

2012-02-02 Thread uday
Dear Uwe , Thanks for reply I have tried format function that u suggested (format(time_t1, %Y %m %d %H %M %S) and I got format(time_t1, %Y %m %d %H %M %S) [1] 126230400 126252000 126273600 126295200 126316800 126338400 I think something is not working correct. -- View this message in

Re: [R] time conversion from second to Y M D H M S format

2012-02-02 Thread R. Michael Weylandt
It works for me as well so there's something funny on your end: please run the following *verbatim* (in a vanilla R session): sink(ForRHelp.txt) print(sessionInfo()) cat(\n) print(.Platform) time -as.POSIXct(c( 126230400, 126252000, 126273600), origin=2005-01-01, tz=GMT) print(time)

Re: [R] time conversion from second to Y M D H M S format

2012-02-02 Thread Berend Hasselman
On 02-02-2012, at 19:23, R. Michael Weylandt wrote: It works for me as well so there's something funny on your end: please run the following *verbatim* (in a vanilla R session): sink(ForRHelp.txt) print(sessionInfo()) cat(\n) print(.Platform) time -as.POSIXct(c( 126230400, 126252000,

Re: [R] time conversion from second to Y M D H M S format

2012-02-02 Thread Berend Hasselman
On 02-02-2012, at 21:10, Berend Hasselman wrote: On 02-02-2012, at 19:23, R. Michael Weylandt wrote: It works for me as well so there's something funny on your end: please run the following *verbatim* (in a vanilla R session): sink(ForRHelp.txt) print(sessionInfo()) cat(\n)

Re: [R] time conversion from second to Y M D H M S format

2012-02-02 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of uday Sent: Thursday, February 02, 2012 8:57 AM To: r-help@r-project.org Subject: Re: [R] time conversion from second to Y M D H M S format Dear Uwe , Thanks for reply I have