pq_to_freq
convert a daily OHLC dataframe into a specified frequency.
pq_to_freq(dt, freq, print_step = 1L)
dt | a list/dataframe of time series dataset. |
---|---|
freq | the frequency that the input daily data will converted to. It supports weekly, monthly, quarterly and yearly. |
print_step | A non-negative integer. Print symbol name by each print_step iteration. Default is 1L. |
# \donttest{ dts = md_stock(c("^000001", "000001"), date_range = 'max', source = '163') #> 1/2 ^000001 #> 2/2 000001 dts_weekly = pq_to_freq(dts, "weekly") #> 1/2 000001.SS #> 2/2 000001.SZ # }