Skip to contents

rounds to next decade if end year is >=5 or floors to previous decade if end year <5.

Usage

round_to_decade(values)

Arguments

values

year

Value

decade

Examples

round_to_decade(2000:2020)
#>  [1] 2000 2000 2000 2000 2000 2010 2010 2010 2010 2010 2010 2010 2010 2010 2010
#> [16] 2020 2020 2020 2020 2020 2020