pd_to_freq: convert the frequency of daily data

Description Usage Arguments Examples

View source: R/pd_to_freq.R

Description

convert the frequency of daily data

Usage

1
pd_to_freq(dt, freq, print_step = 0L)

Arguments

dt

time series datasets

freq

the frequency that the input data will converted to. It supports weekly, monthly, quarterly and yearly.

print_step

A non-negative integer, which will print symbol name by each print_step iteration. Default is 1.

Examples

1
2
3
dts = md_stock(c("^000001", "000001"), date_range = 'max', source = '163')

dts_weekly = pd_to_freq(dts, "weekly")

ShichenXie/getpedr documentation built on Feb. 16, 2019, 5:47 a.m.