ts2yearweek extracts the week of the year and the year from a
timestamp and concatenates both to create a unique identifier for each week
of the year. Around the turn of the year, sometimes, the week of the year
switches already in the last days of the year, or does not switch at the
first days of the new year. These days are corrected to maintain continuous
A vector with timestamps or dates in format POSIXct or Date.
A vector with year_week identifier for each week of the year.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.