Fisheries data is often collected by statistical weeks that start January 1st every year. The second week starts on the following Sunday each year.
So in 2013 Jan. 1st to Jan. 5 was week 1 and Jan. 6 to Jan.12 was week two. I am trying to calculate the statical week given a date for a number of years. My data is just dates in d-m-y format (i.e 16-6-1990) and I want a statistical week output in R code.
An example would be:
> d <- as.Date(c("01-01-2013","06-01-2013","01-01-2006","08-01-2006"),"%d-%m-%Y")
And the desired result would be:
> statweek(d)
[1] 1 2 1 2