Description Usage Arguments Details Value Author(s) See Also Examples
A wrapper for buildHierarchy
, that defaults
to returning all attributes. By default it looks for the
instrument with the most attribute levels, and uses those
attributes for columns. If you would prefer to use the
attribute levels of a given instrument to build the
columns, use attrs.of
.
1 2 | instrument.table(symbols = NULL, exclude = NULL,
attrs.of = NULL)
|
symbols |
A vector of instrument names to include |
exclude |
A vector of names of attributes that should not be included in the returned data.frame |
attrs.of |
name of a FinancialInstrument instrument. Returned data.frame columns will be the attributes of instrument. |
if there are some attributes that you do not want to be
included in the returned data.frame, specify them with
exclude
.
data.frame
Garrett See
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
currency('USD')
stock('GM','USD',exchange='NYSE')
stock('XOM','USD',description='Exxon Mobil')
instrument.table()
#Usually, currencies will not have as many attribute levels
#as other instruments, so you may want to exclude them from the table.
it <- instrument.table(exclude="USD|GM", attrs.of = "XOM") #columns created based on XOM instrument
#it <- instrument.table(exclude=c('USD','GM'), attrs.of = "XOM") #same thing
it <- instrument.table(exclude='tick_size|description|exchange')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.