0

I have 20 years of pre-1900 y data specified by year month and day in separate columns:

yyyy mm dd y; 

I want to extract day-of-the-year (1-366) for each row in R please!

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Bill J
  • 1
  • 1
  • Try `as.Date(paste(dat$year,dat$month,dat$day,sep="-"))`, then consider this question: http://stackoverflow.com/questions/15490614/convert-to-the-day-and-time-of-the-year-in-r/15490743 and answers. – thelatemail Mar 18 '15 at 01:09
  • Thanks. I was avoiding Julian days; the term adds confusion because they are not strictly days of the year (1 to 366).! – Bill J Mar 19 '15 at 03:37

0 Answers0