How to get the week number of the year, starting on Sunday with R

I was looking for a way to get the week number of the year, from Sunday to Saturday. I googled it… and I had to visit 5 – 6 sites to get what I was looking for. This is way above my expected patience for that kind of question.

The answer is:

I hope this post will be ranked #1 in Google and you didn’t have to open as many pages like I did.