mergeMe: Merging it all together

Description Usage Arguments Examples

View source: R/addVariables.R

Description

Helps to merge four datasets (BMI, Systolic BP, Diastolic BP and Diabetes). First one you submit (df1) will be the "main", meaning that all the columns of this data set will be preserved. In the second dataset only some columns will be preserved (according to your demands). You customize that in the colsToSelect argument. "formerge" column is always preserved, and you specify the others.

Usage

1
mergeMe(df1, df2, colsToSelect = NULL)

Arguments

df1

one of the datasets from variableDataEditing() function.

df2

one of the datasets from variableDataEditing() function.

colsToSelect

Default is NULL. A character vector of columns which you want to save from df2. No quotation marks. If you leave it as NULL, only formerge column will be added to the final data frame.

Examples

1
2
3
4
5
6
## Not run: 
mergeMe(bmidata, sysdata, colsToSelect=c(systolicCodeValue, systolicFlag))
mergeMe(bmisys, diastdata, colsToSelect=c(diastolicCodeValue, diastolicFlag))
mergeMe(bmisysdiast, diabetes.data, colsToSelect=c("Diabetes","diabetes.exposure"))

## End(Not run)

dkurtoic/addVariables documentation built on May 30, 2019, 8:28 a.m.