Period Apply Functions:
Apply a function to a time segment (e.g. max, min, mean, etc).
Form: apply.daily(x, FUN, ...).
Options include apply.daily, weekly, monthly, quarterly, yearly.
To-Period Functions:
Convert a time series to time series of lower periodicity (e.g. convert daily to monthly periodicity).
Form: to.period(x, period = 'months', k = 1, indexAt, name = NULL, OHLC = TRUE, ...).
Options include to.minutes, hourly, daily, weekly, monthly, quarterly, yearly.
Note 1 (Important): The return structure is different for to.period and the to.monthly (to.weekly, to.quarterly, etc) forms. to.period returns a date, while to.months returns a character MON YYYY. Best to use to.period if you want to work with time-series via lubridate.
https://cran.r-project.org/web/packages/tidyquant/vignettes/TQ02-quant-integrations-in-tidyquant.html
Apply by Period for example https://rpubs.com/Felix/6653
Period Apply Functions: Apply a function to a time segment (e.g. max, min, mean, etc). Form: apply.daily(x, FUN, ...). Options include apply.daily, weekly, monthly, quarterly, yearly. To-Period Functions: Convert a time series to time series of lower periodicity (e.g. convert daily to monthly periodicity). Form: to.period(x, period = 'months', k = 1, indexAt, name = NULL, OHLC = TRUE, ...). Options include to.minutes, hourly, daily, weekly, monthly, quarterly, yearly. Note 1 (Important): The return structure is different for to.period and the to.monthly (to.weekly, to.quarterly, etc) forms. to.period returns a date, while to.months returns a character MON YYYY. Best to use to.period if you want to work with time-series via lubridate. https://cran.r-project.org/web/packages/tidyquant/vignettes/TQ02-quant-integrations-in-tidyquant.html