pq_opr | R Documentation |
It performs arithmetic operation on numeric columns on multiple series.
pq_opr(dt, opr, x = "close", rm_na = FALSE, ...)
dt |
a list/dataframe of time series datasets. |
opr |
operation string. |
x |
the numeric column names, defaults to close. |
rm_na |
weather to remove NA values when perform arithmetic. |
... |
additional parameters. |
data("dt_banks")
dt1 = pq_opr(dt_banks, '601288.SH/601988.SH')
print(dt1)
dt2 = pq_opr(dt_banks, c('(601288.SH+601988.SH)/2', '(601288.SH*601988.SH)^0.5'))
print(dt2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.