add.defined.by: Add a source to the defined.by field of an 'instrument'

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Concatenate a string or strings (passed through dots) to the defined.by field of an instrument (separated by semi-colons). Any duplicates will be removed. See Details.

Usage

1
add.defined.by(primary_ids, ...)

Arguments

primary_ids

character vector of primary_ids of instruments

...

strings, or character vector, or semi-colon delimited string.

Details

If there is already a value for the defined.by attribute of the primary_id instrument, that string will be split on semi-colons and converted to a character vector. That will be combined with any new strings (in ...). The unique value of this new vector will then be converted into a semi-colon delimited string that will be assigned to the defined.by attribute of the primary_ids' instruments

Many functions that create or update instrument definitions will also add or update the value of the defined.by attribute of that instrument. If an instrument has been updated by more than one function, it's defined.by attribute will likely be a semi-colon delimited string (e.g. “TTR;yahoo”).

Value

called for side-effect

Author(s)

Garrett See

See Also

add.identifier, instrument_attr

Examples

1
2
3
4
5
6
7
## Not run: 
update_instruments.TTR("GS")
getInstrument("GS")$defined.by #TTR
add.defined.by("GS", "gsee", "demo")
add.defined.by("GS", "gsee;demo") #same

## End(Not run)

FinancialInstrument documentation built on May 2, 2019, 3:41 a.m.