ibdplexus is designed to work with data downloaded from the IBD Plexus Portal from the Crohn’s & Colitis Foundation. More information on Plexus and the cohorts can be found here. Functions include:
load_data()loads unzipped data from Plexusload_zipped_data()loads zipped data from Plexusrisk_summary()creates a summary table by visit for RISKsparc_summary()creates a summary table for SPARCcalculate_disease_scores()calculates disease scores for SPARCsparc_scores()calculates disease scores at a specific time for SPARCsparc_medication()predicts the medication a SPARC participant is on at a specific timeemr_extract_diagnosis()subsets the plexus extract based on specified ICD10 codes
You can install the released version of ibdplexus from github with:
# install.packages("devtools")
devtools::install_github("ccf-tfehlmann/ibdplexus")library(ibdplexus)
# Load in all data in IBD Plexus for the SPARC cohort ----
data <- load_data(datadir = "~/r_input/", cohort = "SPARC", domains = "ALL", data_type = "BOTH")
# Get Excel Tables and Data.Frames with Data Summarised within 60 days of the Enrollment Time Point ----
# SPARC Summary Table
e_sum <- sparc_summary(
data = data,
index_info = "ENROLLMENT",
filename = "SPARC_SUMMARY_ENROLLMENT.xlsx",
index_range = "60"
)
# SPARC Scores
e_scores <- sparc_scores(
data = data,
index_info = "ENROLLMENT",
filename = "SPARC_SCORES_ENROLLMENT.xlsx",
index_range = "60"
)
# SPARC Medication
e_med <- sparc_medication(
data = data,
index_info = "ENROLLMENT",
filename = "SPARC_MEDICATION_ENROLLMENT.xlsx"
)