Description Usage Arguments Value Author(s) Examples
View source: R/remove_zero_rows.R
Remove rows where specified column(s) has zero value
1 2 | remove_zero_rows(Symbols, columns = "Volume",
env = .GlobalEnv, store = TRUE)
|
Symbols |
names of instruments |
columns |
which columns to require to have positive, non-zero values ('Volume') |
env |
where to find the data. (.GlobalEnv) |
store |
should the data be overwritten? Must be
|
usually called for side-effect, returning only the symbol
names. If store=FALSE
the cleaned data is
returned.
Garrett See
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
get data for all big Vix futures that expire in 2010
getSymbols('VX',Month=1:12,Year=2010, require.volume=FALSE, src='cfe')
head(VX_F10); tail(VX_F10)
remove_zero_rows('VX_F10','Settle') #require 'Settle' column to be positive
head(VX_F10); tail(VX_F10) #Last row has zeros for everything except Settle.
remove_zero_rows("VX_G10",'Volume')
remove_zero_rows("VX_H10",c("Close","Settle","Volume"))
remove_zero_rows(c("VX_J10","VX_K10","VX_M10"),'Volume')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.