Description Usage Arguments Value Author(s) Examples
get the nearest tradingday.
1 | trday.nearest(datelist, dir = -1L, stockID = NULL, TS, drop)
|
datelist |
a vector of class Date |
dir |
a integer. Indicating forward or backward to find, if |
stockID |
a character string or null. If null, the market trading days, other wise the trading days of specific stock. |
a vector of class Date, the value of which is the nearest tradingday before/after the datelist
if datelist
is not a tradingday, otherwise,the datelist
itself.
Ruifei.Yin
1 2 3 4 | datelist <- as.Date(c("2012-07-21","2012-07-22","2012-07-23","2013-01-30"))
trday.nearest(datelist)
trday.nearest(datelist, dir = 1)
trday.nearest(datelist, dir = 1, stockID="EQ000527")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.