cleanAccount: Clean accounting data

Description Usage Arguments Value Note See Also Examples

Description

Accepts formatted accounting data (as would be found in data imported from .csv, .xls, or xlsx files, as well as from webscraping) with dollar signs and character notations for trillion, billion, and million. Converts the input into a numeric that can be used in operations that require type as.numeric.

Usage

1

Arguments

acc

Character; string of a number in accounting format (i.e. "$792.76B")

Value

Numeric; non-formatted version of the input argument

Note

Data with a suffix of a single "m" or "M" character will not be considered "1000" but will be interpreted as one million (1000000).

See Also

Other data cleaning functions: cleanIP, cleanIndex, cleanSector

Examples

1
2
cleanAccount("$792.76B")
cleanAccount("435.5 mn")

alec25/smif.package documentation built on May 22, 2019, 12:36 p.m.