Learn R Programming

FinancialInstrument (version 1.3.1)

add.identifier: Add an identifier to an instrument

Description

Add an identifier to an instrument unless the instrument already has that identifier.

Usage

add.identifier(primary_id, ...)

Arguments

primary_id

primary_id of an instrument

...

identifiers passed as regular named arguments.

Value

called for side-effect

See Also

instrument_attr

Examples

Run this code
# NOT RUN {
stock("XXX", currency("USD"))
add.identifier("XXX", yahoo="^XXX") 
getInstrument("^XXX")
add.identifier("^XXX", "x3")
all.equal(getInstrument("x3"), getInstrument("XXX")) #TRUE
# }

Run the code above in your browser using DataLab