[R] How to improve a function converting year, day of year, decimal hour into date ?

Ptit_Bleu ptit_bleu at yahoo.fr
Tue Nov 20 14:01:04 CET 2007


Thank you Gabor for your fast answer (received as I was reading R News 4/1)
Ptit Bleu.


library(chron)
chron(paste("1/1/", year, sep = "")) + julday + hour/24

That produces a chron, i.e. dates/times class datetime.  If you want
it as a string use format(...above expression...)    See the help desk
article in R News 4/1.

-- 
View this message in context: http://www.nabble.com/How-to-improve-a-function-converting-year%2Cday-of-year%2Cdecimal-hour-into-date---tf4843032.html#a13856584
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list