Convert the bases of the solidus and denarius units of deb_lsd or deb_decimal vectors.

deb_convert_bases(x, to)

# S3 method for deb_lsd
deb_convert_bases(x, to)

# S3 method for deb_decimal
deb_convert_bases(x, to)

Arguments

x

A vector of class deb_lsd or deb_decimal.

to

Numeric vector of length 2, representing the bases for the solidus and denarius units to be converted to.

Value

A vector of the same class as x with converted bases attribute.

Details

deb_convert_bases() is the only way to change the bases of the solidus and denarius units associated with vectors of class deb_lsd or deb_lsd.

Examples

x <- deb_lsd(5, 3, 8) y <- deb_decimal(8.825) deb_convert_bases(x, to = c(60, 16))
#> <deb_lsd[1]> #> [1] 5:11s:0d #> # Bases: 60s 16d
deb_convert_bases(y, to = c(60, 16))
#> <deb_decimal[1]> #> [1] 8.825 #> # Unit: libra #> # Bases: 60s 16d