clean_currency: Clean Currency Values

Description Usage Arguments Details

Description

Often Junar data involving currency data is not clean because for some reason content and presentation of currency values is not separated). To clean up this data quickly the following helper function accepts the position of the character value for the currency and the thousands and decimal delimiters.

Usage

1
2
clean_currency(currency_column, currency_symbol_pos = 1,
  thousand_separator = ",", decimal_separator = ".")

Arguments

currency_column

The column in the data frame that contains the currency values.

currency_symbol_pos

The position from the left of the currency symbol used. If any spaces are included, please include them here as well.

thousand_separator

The character value that separates thousands (defaults to ",")

decimal_separator

The character value that separates decimals (defaults to ".")

Details

The currency character position defaults to the first character from the left. And it refers directly to the symbol as present in the data frame column, because some characters (such as the symbol for the Costa Rican Colon) give are uncommon and lead to multiple encoding and font errors.


junr documentation built on May 1, 2019, 7:57 p.m.