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. ______________________________________________ R-help@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.