desagregate_df: desagregate_df

Description Usage Arguments Details Value Author(s)

View source: R/utils.R

Description

Desagregate a dateset for all the observations based on a specific variable with frequency greater to 1, taking in mind that the id variable needs to be unique.

Usage

1
desagregate_df(df, ref_desgte, id)

Arguments

df

original dataset to desagregate

ref_desgte

reference desagregation variable

id

unique id variable

Details

This function has been design to check if the variable id is unique filtered by the variable ref_desgte and if it is then for the observations in ref_desgte with frequency greater than one desagregate in each id, in other case return the observations in the same way for each filter id.

Value

the dataset df desagregated by the variable ref_desgte

Author(s)

Eduardo Trujillo


1Edtrujillo1/udeploy documentation built on July 13, 2021, 9:12 p.m.