add_monthly_covariates: Function to add covariate data to a dataframe

Description Usage Arguments Examples

View source: R/add_monthly_covariates.R

Description

This function performs a merge of monthly covariate data into a dataframe with day-level observations. E.g. I have multiple observations from January 2012 and I want to add the monthly January covariate data to each of those observations.

Usage

1
add_monthly_covariates(target_df, monthly_data)

Arguments

target_df

Target dataframe with day-level observations, where "date" is the last column

monthly_data

Dataframe of covariates, recorded on a monthly basis on the 1st day of each month, where "date" is the last column

Examples

1
add_monthly_covariates(FARC_results, monthly_viol)

leslie-huang/MApkg documentation built on May 21, 2019, 5:11 a.m.