- Study title: Trends in the use of commonly used antibiotics associated with antimicrobial resistance
- Study leads:
- ShinyApp:
- Publications:
- R and RStudio are required to run the code.
- Ensure that you have access to the database and necessary credentials to connect.
-
Download the Repository
Download this repository:- Either download as a ZIP file using
Code -> Download ZIP, then unzip. - Or, use GitHub Desktop to clone the repository.
- Either download as a ZIP file using
-
Open the R Project
- Navigate to the
Studyfolder and open the project fileStudy.Rprojin RStudio. - You should see the project name in the top-right corner of your RStudio session.
- Navigate to the
-
Run the Analysis Code
- Open the
CodeToRun.Rfile. This is the main script you’ll use. - Follow the instructions within the file to add your database-specific information.
- Run the code as directed. This will generate a
Resultsfolder containing the outputs, including a log file, zip file with the DED results, and a csv with the study results. The name of the zip file will be of the formatDED_Results_database_name.zip, and the name of the csv will beresults.csv.
- Open the
-
OPTIONAL: Visualize Results in Shiny
- To visualise the DED results, navigate to the
Reportfolder, then theDED_shinyfolder, and open the project fileDrugExposureDiagnosticsShiny.Rprojin RStudio. Copy the generated .zip file into thedatafolder. Open theglobal.Rscript and click the Run App button in RStudio to launch the local Shiny app. - To visualise the study results, navigate to the
Reportfolder, then theshinyfolder, and open the project fileshiny.Rprojin RStudio. Copy the generatedresults.csvfile into thedatafolder. Open theglobal.Rscript and click the Run App button in RStudio to launch the local Shiny app.
- To visualise the DED results, navigate to the
This repo is organized as follows: