Skip to contents

Internal function to translate misnamed or abbreviated keywords into valid ones. Uses utils_time_keywords_dictionary() as reference dictionary.

Usage

utils_time_keywords_translate(keyword = NULL)

Arguments

keyword

(optional, character string) A time keyword such as "day". Default: NULL

Value

Time keyword.

Examples

#millennia
utils_time_keywords_translate(
  keyword = "1000 years"
)
#> [1] "millennia"

utils_time_keywords_translate(
  keyword = "1000 y"
)
#> [1] "millennia"

utils_time_keywords_translate(
  keyword = "thousands"
)
#> [1] "millennia"

#years
utils_time_keywords_translate(
  keyword = "year"
)
#> [1] "years"

utils_time_keywords_translate(
  keyword = "y"
)
#> [1] "years"

#days
utils_time_keywords_translate(
  keyword = "d"
)
#> [1] "days"

utils_time_keywords_translate(
  keyword = "day"
)
#> [1] "days"

#seconds
utils_time_keywords_translate(
  keyword = "s"
)
#> [1] "seconds"

utils_time_keywords_translate(
  keyword = "sec"
)
#> [1] "seconds"