filter.data.by.frequency: Filter by frequency

Description Usage Arguments Value

View source: R/classes.R

Description

Returns a date frame with a frequency that matches the target variable frequency (object@freq)

Usage

1
filter.data.by.frequency(df, object, predictor_freq)

Arguments

df

data.frame without NA's

object

nowcast

predictor_freq

character from ('d','w', 'm', 'q')

If the target variable frequency and predictor frequency matches, returns original df. If the target variable is quarterly and predictor is monthly, returns every third row of df, ending with last df's row. If the target variable is monthly and predictor is quarterly, repeats each df's row three times. If the predictor is daily or weekly and the target variable is quarterly or monthly, firstly for the df's last date defines day number in its quarter or months (dn), then returns df, where each row corresponds to the dn day of quarter of month.

Value

data.frame


mkhlgrv/rmen documentation built on Dec. 21, 2021, 7:06 p.m.