Get data frame for specified time period

get_df_with_selected_time_period(df, nb_period = NULL, period_type = "max")

Arguments

df

A data frame containing a panel.

nb_period

An integer indicating the number of months. Default is NULL. Does not need to be specified for period_type max and ytd.

period_type

A single character string. Default max. Possible values max, ytd, weeks and months.

Value

A data frame containing the original data frame only for the specified time period.