Description Usage Arguments Value Examples
This function takes a year as a numeric value and rounds it to the nearest decade or century.
1 | round_year(year, round_to = c("decade", "century"))
|
year |
Year to test (as a number) |
round_to |
Round the year to either the |
The rounded year as an integer.
1 2 3 | set_of_years <- seq(1892, 1923, 4)
round_year(set_of_years) # round to decade by default
round_year(set_of_years, round_to = "century")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.