Description Usage Arguments Value Author(s) See Also Examples
ls_ functions get names of instruments denominated in a given currency (or currencies) rm_ functions remove instruments of a given currency
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ls_by_currency(currency, pattern = NULL, match = TRUE,
show.currencies = FALSE)
rm_by_currency(x, currency, keep.currencies = TRUE)
ls_USD(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_AUD(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_GBP(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_CAD(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_EUR(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_JPY(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_CHF(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_HKD(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_SEK(pattern = NULL, match = TRUE,
show.currencies = FALSE)
ls_NZD(pattern = NULL, match = TRUE,
show.currencies = FALSE)
|
currency |
chr vector of names of currency |
pattern |
an optional regular expression. Only names matching ‘pattern’ are returned. |
match |
exact match? |
show.currencies |
include names of currency instruments in the returned names? |
keep.currencies |
Do not delete currency instruments when deleting multiple instruments. |
x |
what to remove. chr vector. |
ls_ functions return vector of instrument names rm_ functions return invisible / called for side-effect.
Garrett See
ls_instruments, ls_currencies, rm_instruments, rm_currencies, twsInstrument, instrument
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
#First create instruments
currency(c('USD','CAD','GBP')
stock(c('CM','CNQ'),'CAD')
stock(c('BET','BARC'),'GBP')
stock(c('SPY','DIA'),'USD')
#now the examples
ls_by_currency(c('CAD','GBP'))
ls_USD()
ls_CAD()
#2 ways to remove all instruments of a currency
rm_instruments(ls_USD())
#rm_instruments(ls_GBP(),keep.currencies=FALSE)
rm_by_currency( ,'CAD')
#rm_by_currency( ,'CAD', keep.currencies=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.