I want to extract weeknumber in R using the same system 1 as used by WEEKNUM function in Excel.
Please refer to the image below
I have explored all the available option to extract weeknumber from date in R but nothing is fulfilling my objective
library(parsedate)
dates =c("12/25/2015", "12/26/2015", "12/27/2015", "12/28/2015", "12/29/2015", "12/30/2015", "12/31/2015", "1/1/2016", "1/2/2016", "1/3/2016", "12/24/2016", "12/26/2016", "12/27/2016", "12/28/2016", "12/29/2016", "12/30/2016", "1/1/2017", "1/2/2017")
#Converting dates into date format in R
dates = as.Date(parse_date(dates), format = "%Y-%m-%d")
desired_output
52 52 53 53 53 53 53 1 1 2 2 52 53 53 53 53 53 53 1 1
Can anyone please help me to figure out a way to do this.
Caution :- Please verify things before marking this as possible duplicate. This might ends up deviating folks who can provide solution to the question.