yes, you are perfectly right, sorry for that but for me was not so clear the error message!
....and the third code example I posted (not working either) should be of length one (if I'm not wrong again) but most of all what is not included in my reproducible example and get a bit confused my question is the case when the variable "date" contains dates of many years and the objective is to count for each given year the julian date starting from the first day of the corresponding year how would you deal with this problem? thanks a lot for your help max -- View this message in context: http://r.789695.n4.nabble.com/julian-day-form-POSIXt-object-tp3855885p3856151.html 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.