Learn R Programming

cryptoTax (version 0.0.5)

format_dollars: Format numeric values to dollars

Description

Format numeric values with comma for thousands separator. Can be converted back from this format to numeric using to = "numeric".

Usage

format_dollars(x, to = "character")

Value

A value representing dollars, either as a formatted character string or as a numeric value.

Arguments

x

The formatted.ACB file

to

What to convert to, with otions c("character", "numeric").

Examples

Run this code
x <- format_dollars(1010.92)
x
format_dollars(x, to = "numeric")

Run the code above in your browser using DataLab