Learn R Programming

MDMA (version 2.0.0)

currency2unicode: Currency unicode character

Description

Retrieve Unicode character for a currency

[Stable]

Usage

currency2unicode(currency, type = c("character", "code"))

Value

currency2unicode the unicode character for a given currency.

Arguments

currency

character string or a vector of strings. Supported values are accounting sign, afghani, armenian dram, austral, baht, bitcoin, boliviano, cent, cedi, currency, dollar, dong, drachma, dutch guilder, euro, franc, georgian lari, german penny, hryvnia, indian rupee, iranian rial, kip, lari, lira, livre tournois, manat, mark, new shekel, pakistani rupee, peso, pound, quetzal, real, rial, ruble, shekel, spesmilo, syrian pound, tenge, tugrik, turkish lira, won, yen, yuan.

type

indicate whether the Unicode character(s) or the Unicode code(s) should be returned.

Author

Mathijs Deen

Details

The input is evaluated case insensitive. In case the input is not supported, the function will return the original input.

Examples

Run this code
currency2unicode("dollar")

cat(sprintf("%s5 is all my mom allows me to spend.", currency2unicode("dollar")))

Run the code above in your browser using DataLab