[R] a R question

ggrothendieck@yifan.net ggrothendieck at yifan.net
Wed Mar 20 15:55:09 CET 2002


Add the base date to your number and then
use format to format it:

z <- 995752800
time0 <- as.POSIXct("1970-01-01", tz="GMT")
format(z+time0,"%Y-%m,%d,%H,%M,%S")



On 20 Mar 2002 at 12:18, Jesús Fernández Gálvez wrote:

> Dear Sir,
> 
> I have been working with R  for some time now and I am very happy with
> it, but I have found a problem that I could not resolve. Could you
> please give me some hint about how to transform  POSIX time data in
> seconds to  string  format?. (eg. 995752800 -> year-month,day,hour,min,
> sec) I tryed with Sys.time(), strptime() and date() but without success.
> 
> Thank you very much in advance
> 
> Jesus Fernandez
> Estacion Experimental del  Zaidin
> Granada, Spain
> 
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list