join_fromalex_sample: return all rows and all columns from both data frames. Where...

Description Usage Arguments Examples

View source: R/get_alexdata.R

Description

return all rows and all columns from both data frames. Where there are not matching values, returns NA for the one missing.

Usage

1
join_fromalex_sample(sample_df1, sample_df2, ID = "sample_subject_name")

Arguments

sample_df1

the 1st data frame

sample_df2

the 2nd data frame to be joind

ID

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

Examples

1
2
3
4
# load sample_visit_event
alex_sample_visit_event <- read_alex_database(fileName = "/Users/yue/Dropbox/Joy/tabacco_grant/data/data_fromalex/database/database10052017/sample_visit_event.csv", uselessColumns = c("X"))
alex_tobacco_grant_albumin <- read_alex_database(file = "//Users/yue/Dropbox/Joy/tabacco_grant/data/data_fromalex/database/database10052017/tobacco_grant_albumin.csv", uselessColumns = c("X", "index","rank_id")) %>% unique
alex_sample <- join_fromalex_sample(alex_sample_visit_event, alex_tobacco_grant_albumin)

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