Convert numbers to denominator character vectors (whole, half, third)

denominator(
x,
numerator = 1,
quarter = get_config("nombre::quarter", TRUE),
...
)

nom_denom(x, numerator = 1, quarter = get_config("nombre::quarter", TRUE), ...)

## Arguments

x A numeric vector A numeric vector. The numerator(s) associated with the denominator(s). When numerator is not 1 or -1, the denominator will be pluralized. A logical of length one. If TRUE, the denominator of 4 will be "quarter(s)". If FALSE, the denominator of 4 will be "fourth(s)". Defaults to TRUE. Default can be changed with set_config("nombre::quarter"). Additional arguments passed to ordinal()

## Value

A character vector of the same length as x

Other number names: adverbial(), cardinal(), collective(), numerator(), ordinal()

## Examples

nom_denom(2)
#>  "half"nom_denom(1:10)
#>   "whole"   "half"    "third"   "quarter" "fifth"   "sixth"   "seventh"
#>   "eighth"  "ninth"   "tenth"  nom_denom(1:10, numerator = 2)
#>   "wholes"   "halves"   "thirds"   "quarters" "fifths"   "sixths"
#>   "sevenths" "eighths"  "ninths"   "tenths"  nom_denom(1:10, numerator = 1:10)
#>   "whole"    "halves"   "thirds"   "quarters" "fifths"   "sixths"
#>   "sevenths" "eighths"  "ninths"   "tenths"
nom_denom(4)
#>  "quarter"nom_denom(4, quarter = FALSE)
#>  "fourth"
nom_denom(1:10, numerator = 2, cardinal = FALSE)
#>   "wholes" "halves" "3rds"   "4ths"   "5ths"   "6ths"   "7ths"   "8ths"
#>   "9ths"   "10ths" nom_denom(5:15, numerator = 2, max_n = 10)
#>   "fifths"   "sixths"   "sevenths" "eighths"  "ninths"   "tenths"
#>   "11ths"    "12ths"    "13ths"    "14ths"    "15ths"