Description Usage Arguments Details See Also Examples
This function will load instrument metadata (data about
the data) either from a file specified by the file
argument or from a data.frame specified by the
metadata argument.
1 2 3 |
file |
string identifying file to load, default NULL, see Details |
... |
any other passthru parameters |
metadata |
optional, data.frame containing metadata, default NULL, see Details |
id_col |
numeric column containing id if primary_id isn't defined, default 1 |
default_type |
character string to use as instrument type fallback, see Details |
identifier_cols |
character vector of field names to be passed as identifiers, see Details |
overwrite |
TRUE/FALSE. See
|
The function will attempt to make reasonable assumptions about what you're trying to do, but this isn't magic.
You will typically need to specify the type of
instrument to be loaded, failure to do so will generate a
Warning and default_type will be used.
You will need to specify a primary_id, or define a
id_col that contains the data to be used as the
primary_id of the instrument.
You will need to specify a currency, unless the
instrument type is 'currency'
Use the identifier_cols argument to specify which
fields (if any) in the CSV are to be passed to
instrument as the identifiers
argument
Typically, columns will exist for multiplier and
tick_size.
Any other columns necessary to define the specified instrument type will also be required to avoid fatal Errors.
Additional columns will be processed, either as
additional identifiers for recognized identifier names,
or as custom fields. See instrument for
more information on custom fields.
loadInstruments, instrument,
setSymbolLookup.FI,
getSymbols,
getSymbols.FI
1 2 3 4 5 6 7 | ## Not run:
load.instruments(system.file('data/currencies.csv',package='FinancialInstrument'))
load.instruments(system.file('data/root_contracts.csv',package='FinancialInstrument'))
load.instruments(system.file('data/future_series.csv',package='FinancialInstrument'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.