Create a vector of class
deb_decimal to integrate non-decimal currencies
into standardized forms of analysis provided by R.
deb_decimal(x = double(), unit = c("l", "s", "d"), bases = c(20, 12))
A numeric vector representing the decimalized values of a non-decimal currency.
A character vector of length one indicating the unit for the
decimalized values, either
Numeric vector of length 2 used to specify the bases for the
solidus or s and denarius or d units. Default is
Returns a vector of class
deb_decimal class and the
debkeepr package use the nomenclature of
l, s, and d to represent pounds,
shillings, and pence units. The abbreviations derive from the Latin terms
denarius. In the 8th century a
solidus came to represent 12 denarii coins, and, for a time at least, 240
denarii were made from one libra or pound of silver. The custom of counting
coins in dozens (solidi) and scores of dozens (librae) spread throughout the
Carolingian Empire and became engrained in much of Europe. However, a
variety of accounting systems arose at different times that used
other bases for the
solidus and denarius units. The
bases attribute of
makes it possible to specify alternative bases for the solidus and denarius
units, while the
unit attribute identifies the decimalized unit: either
libra, solidus, or denarius.
deb_decimal class works in concert with the
deb_lsd class, which
maintains the tripartite unit structure of most non-decimal currencies.
#> <deb_decimal> #>  5.250 3.825 8.500 #> # Unit: libra #> # Bases: 20s 12d#> <deb_decimal> #>  105.0 76.5 170.0 #> # Unit: solidus #> # Bases: 20s 12d#> <deb_decimal> #>  1260 918 240 #> # Unit: denarius #> # Bases: 20s 12d#> <deb_decimal> #>  5.250 3.825 8.500 #> # Unit: libra #> # Bases: 60s 16d# Create a prototype or vector of length 0 deb_decimal()#> <deb_decimal> #> # Unit: libra #> # Bases: 20s 12d