join_fromalex_subject: Join two dataframe that contains subject level information...

Description Usage Arguments Examples

View source: R/get_alexdata.R

Description

Join two dataframe that contains subject level information together by using certain columns (default set to ebh_id, redcap_event_name) return all rows and all columns from both data frames. Where there are not matching values, returns NA for the one missing.

Usage

1
2
join_fromalex_subject(subject_df1, subject_df2, ID = c("ehb_id",
  "redcap_event_name"))

Arguments

subject_df1

the 1st data frame

subject_df2

the 2nd data frame to be joind

ID

names of the columns used to merge the two data frames, default set to ehb_id, redcap_event_name

Examples

1
2
3
alex_demographics_information <- read_alex_database(fileName ="/Users/yue/Dropbox/Joy/tabacco_grant/data/data_fromalex/database/database10052017/demographics_information.csv")
alex_antiobiotics_timing <- read_alex_database(fileName = "/Users/yue/Dropbox/Joy/tabacco_grant/data/data_fromalex/database/database10052017/antiobiotics_timing.csv")
alex_subject <- join_fromalex_subject(alex_demographics_information, alex_antiobiotics_timing)

reny1/alexdata documentation built on May 29, 2019, 8:06 a.m.