convert-bases | R Documentation |
deb_lsd
, deb_tetra
, and deb_decimal
vectorsConvert bases of deb_lsd
, deb_tetra
, and deb_decimal
vectors
deb_convert_bases(x, to)
## Default S3 method:
deb_convert_bases(x, to)
## S3 method for class 'deb_lsd'
deb_convert_bases(x, to)
## S3 method for class 'deb_decimal'
deb_convert_bases(x, to)
## S3 method for class 'deb_tetra'
deb_convert_bases(x, to)
x |
A vector of class |
to |
Numeric vector of length 2 or 3, representing the bases for the solidus, denarius, and optionally farthing units to be converted to. |
deb_convert_bases()
is the only way to change the bases of the solidus,
denarius, and farthing units associated with vectors of class deb_lsd
,
deb_tetra
, and deb_decimal
. It also provides a means to convert
between tripartite and tetrapartite bases with deb_decimal
vectors.
If x
is a deb_decimal
vector with tetrapartite bases and unit "f"
and to
is a numeric vector of length 2, the unit will be converted
to "d"
.
A vector of the same class as x
with converted bases
attribute.
lsd <- deb_lsd(5, 3, 8)
dec <- deb_decimal(8.825)
dec_tetra <- deb_decimal(1.840625, bases = c(20, 12, 4))
tetra <- deb_tetra(1, 16, 9, 3)
deb_convert_bases(lsd, to = c(60, 16))
deb_convert_bases(dec, to = c(60, 16))
deb_convert_bases(dec_tetra, c(60, 16, 8))
deb_convert_bases(tetra, to = c(60, 16, 8))
# Convert between tripartite and tetrapartite bases
deb_convert_bases(dec, to = c(60, 16, 8))
deb_convert_bases(dec_tetra, to = c(20, 12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.