/
README.Rmd
52 lines (35 loc) · 2.19 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# Introduction to TB Models
A shiny app reproducing the models used in the Introduction to Tuberculosis modelling course practicals, run by [TB MAC](http://tb-mac.org/) at the [2017 Union conference](http://guadalajara.worldlunghealth.org/about-us). See the [TB MAC](http://tb-mac.org/) website for course materials and further resources. The models used in this course, and reproduced in this shiny app, were based on one published by [Lin et al.](http://www.who.int/bulletin/volumes/90/10/11-101436.pdf)
## Installing the shiny app locally
## Manual Install
To install and run the shiny app locally on your own computer you will need to first install [R](https://www.r-project.org/), it is also suggested that you install [Rstudio](https://www.rstudio.com/products/rstudio/download/). After downloading the source code from [this repository](https://www.github.com/seabbs/intro_to_tb_models) click on the `intro_to_tb_models.Rprof` file, this will open an Rstudio window. Type the following code into the command line;
```{r, eval = FALSE}
install.packages("shiny")
install.packages("shinydashboard")
install.packages("DT")
install.packages("ggplot2")
install.packages("tidyr")
install.packages("dplyr")
install.packages("tibble")
install.packages("rmarkdown")
install.packages("plotly")
```
To run the app open the `ui.R` file and press run, depending on your computer this may take some time.
### Using Docker
[Docker](https://www.docker.com/what-docker) is a container software that seeks to eliminate "works on my machine" issues. For installation and set up instructions see [here](https://www.docker.com/community-edition).
This docker container is based on the [shiny](https://hub.docker.com/r/rocker/shiny/) docker image, see [here](https://github.com/rocker-org/shiny) for instructions on use. To run the docker image run the following in a bash shell:
```{bash, eval = FALSE}
docker pull seabbs/intro_to_tb_models
docker run --rm -p 3838:3838 seabbs/intro_to_tb_models
```
The shiny app can be found on port `:3838` at your local machines ip (or localhost on windows).