[R] julian day form POSIXt object
maxbre
mbressan at arpa.veneto.it
Fri Sep 30 10:47:49 CEST 2011
here is an alternative long and winded solution to the problem sticking on
the julian function of chron package
test$year <- as.integer(as.character(test$date, "%Y"))
test$month <- as.integer(as.character(test$date, "%m"))
test$day <- as.integer(as.character(test$date, "%d"))
test$hour <- as.integer(as.character(test$date, "%H"))
test$jday <-julian(test$month,test$day,test$year,origin=c(month=1, day=0,
year=test$year))
thank you all for helping me in sorting out the problem
by the way I like very much this very compact solution
test$doy <- as.POSIXlt(test$date)$yday+1
but on the other hand I'm still struggling to fully understand it,
especially for what is concerning the part after $: so what is $yday for?
if someone would be so kind to explain me this part I would be very grateful
a newbie in R
lesson learned
max
--
View this message in context: http://r.789695.n4.nabble.com/julian-day-form-POSIXt-object-tp3855885p3859187.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list