identifypd: Extract lastest period of dataset

Description Usage Arguments Examples

View source: R/identifypd.R

Description

This function is pulled from the achafetz/PartnerProgress repo

Usage

1
identifypd(df, pd_type = "full", pd_prior = FALSE)

Arguments

df

dataset to use to find latest period

pd_type

what is returned? (a) full, eg fy2018q1; (b)year, eg 2018; (c) quarter, eg 1

pd_prior

do you want the last period returned (instead of the current); default = FALSE

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
#return full, current period, eg "fy2018q3"
identifypd(df_mer)
#return the current quarter, eg 3
identifypd(df_mer, "quarter")
#return the prior quarter, eg "fy2018q2"
identifypd(df_mer, pd_prior = TRUE)
  
## End(Not run)

ICPI/ICPIutilities documentation built on July 22, 2021, 4:21 a.m.