I have a list of dates like these:
library(lubridate)
my.dates <- c("03-01-2006", "28-01-2006", "12-01-2008", "02-02-2006", "03-03-2008")
my.dates <- dmy(my.dates)
I need to extract, the day number of the year from each date as below, where 1st January is day 1:
day.number <- c(3, 28, 12, 33, 62)
I've had a good hunt around google and SO but cannot find an easy way of doing this. Help appreciated, thanks.