The default method assumes the ISO can be accessed as if it were an attribute with name iso (e.g. x$iso). The method for CurrencyPair concatenates the ISOs of the constituent currencies (e.g. iso(AUDUSD()) returns "AUDUSD") while the methods for CashIndex and IborIndex return the ISO of the index's currency.

# S3 method for CurrencyPair
iso(x)

iso(x)

# S3 method for default
iso(x)

# S3 method for IborIndex
iso(x)

# S3 method for CashIndex
iso(x)

Arguments

x

object from which to extract an ISO

Value

a string of the ISO

Examples

library("lubridate") iso(AUD())
#> [1] "AUD"
iso(AUDUSD())
#> [1] "AUDUSD"
iso(AUDBBSW(months(3)))
#> [1] "AUD"
iso(AONIA())
#> [1] "AUD"