cast-decimal: Cast to 'deb_decimal'

Description Usage Arguments

Description

Cast x to a deb_decimal vector.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
deb_as_decimal(x, ...)

## S3 method for class 'deb_decimal'
deb_as_decimal(x, ...)

## S3 method for class 'deb_lsd'
deb_as_decimal(x, unit = c("l", "s", "d"), ...)

## S3 method for class 'numeric'
deb_as_decimal(x, unit = c("l", "s", "d"), bases = c(20, 12), ...)

## S3 method for class 'logical'
deb_as_decimal(x, unit = c("l", "s", "d"), bases = c(20, 12), ...)

Arguments

x

An object to coerce to deb_decimal.

...

Arguments passed on to further methods.

unit

A character vector of length one indicating the unit for the decimalized values, either "l" (pounds, the default), "s" (shillings), or "d" (pence).

bases

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.


jessesadler/debvctrs documentation built on June 14, 2021, 6:36 a.m.