Function returns new time series as an xts
object. The observations are always previous-tick observations. If marketopen
is set to before the start of the time series ts
, the timestamp is discarded and the first returned timestamp is the first in-fact time stamp. The ts
object can contain multiple days of data.
1 2 3 | aggregatePrice(ts, on = "minutes", k = 1, marketopen = "08:30:00",
marketclose = "15:15:00", pad = TRUE, pad.arg = NA_real_,
aggr.vec = numeric(0))
|
ts |
|
on |
character, indicating the time scale at which the series will be aggregated: |
k |
positive integer, aggregation is performed every k |
marketopen |
string in format |
marketclose |
string in format |
pad.na |
logical, if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.