Create a vector of class deb_lsd to integrate non-decimal currencies into standardized forms of analysis provided by R.

deb_lsd(l = double(), s = double(), d = double(), bases = c(20, 12))

## Arguments

l Numeric vector representing the pounds unit. Numeric vector representing the shillings unit. Numeric vector representing the pence unit. Numeric vector of length 2 used to specify the bases for the solidus or s and denarius or d units. Default is c(20, 12), which conforms to the most widely used system of 1 pound = 20 shillings and 1 shilling = 12 pence.

## Value

Returns a vector of class deb_lsd.

## Details

The deb_lsd 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 libra, solidus, and 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 deb_lsd vectors makes it possible to specify alternative bases for the solidus and denarius units.

The length of l, s, and d must either be all equal, or a vector of length 1 can be recycled to the length of the other argument(s). See the vctrs package for further details on recycling vectors. In addition, l, s, and d must either all have no values, resulting in a vector of length 0, or all possess numeric vectors.

The deb_lsd class works in concert with the deb_decimal class, which represents non-decimal currencies as decimalized values. See deb_decimal().

## Examples


deb_lsd(5, 3, 8)#> <deb_lsd>
#>  5:3s:8d
#> # Bases: 20s 12ddeb_lsd(l = c(10, 8, 5),
s = c(6, 13, 8),
d = c(8, 4, 10))#> <deb_lsd>
#>  10:6s:8d 8:13s:4d 5:8s:10d
#> # Bases: 20s 12d
# Recycle length 1 vector
deb_lsd(l = c(10, 8, 5),
s = c(6, 13, 8),
d = 0)#> <deb_lsd>
#>  10:6s:0d 8:13s:0d 5:8s:0d
#> # Bases: 20s 12d
# Set the bases of the deb_lsd vector
deb_lsd(5, 3, 8, bases = c(60, 16))#> <deb_lsd>
#>  5:3s:8d
#> # Bases: 60s 16ddeb_lsd(l = c(10, 28, 5),
s = c(6, 33, 13),
d = c(8, 42, 10),
bases = c(60, 16))#> <deb_lsd>
#>  10:6s:8d   28:33s:42d 5:13s:10d
#> # Bases: 60s 16d
# Create a prototype or vector of length 0
deb_lsd()#> <deb_lsd>
#> # Bases: 20s 12d