- Download this entire repository (you can download as a zip folder using Code -> Download ZIP, or you can use GitHub Desktop).
- Open the project study.Rproj from the study_code directory in RStudio (when inside the project, you will see its name on the top-right of your RStudio session)
- Open the code_to_run.R file - this is the only file you should need to interact with.
- Install the required packages using renv::restore() and then load these libraries
- Add your database specific parameters (name of database, schema name with OMOP data, schema name to write results, table name stem for results to be saved in the result schema).
- Create a cdm using CDMConnector (see https://darwin-eu.github.io/CDMConnector/articles/a04_DBI_connection_examples.html for connection examples for different dbms).
- Run the last line of code_to_run.R to run the analysis.
- After running the study code, you should CSV with your results created in the study_code/results directory. Copy this csv to the study_shiny/data directory
- Open the project shiny.Rproj from the shiny directory in RStudio
- Open global.R and click the "Run App" button
- A shiny app with your results should then be launched