Skip to content

Commit c9d6529

Browse files
committed
Fix git issues
2 parents 0b81510 + 7a019c6 commit c9d6529

9 files changed

+307
-2
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ docs/
1111
/*.png
1212
*.xlsx
1313
R/rob_paired_plot.R
14-
README.md
15-
man/figures/robplot*

README.md

+307
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,307 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# robvis <img src="man/figures/robvis_hex_box.png" align="right" width="18%" height="18%" />
5+
6+
[![Project Status: Active – The project has reached a stable, usable
7+
state and is being actively
8+
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
9+
[![CRAN
10+
Badge.](https://www.r-pkg.org/badges/version-ago/robvis)](https://CRAN.R-project.org/package=robvis)
11+
[![CRAN
12+
Downloads.](https://cranlogs.r-pkg.org/badges/last-month/robvis)](https://CRAN.R-project.org/package=robvis)
13+
<br> [![R build
14+
status](https://github.com/mcguinlu/robvis/workflows/R-CMD-check/badge.svg)](https://github.com/mcguinlu/robvis/actions)
15+
[![Codecov test
16+
coverage](https://codecov.io/gh/mcguinlu/robvis/branch/master/graph/badge.svg)](https://codecov.io/gh/mcguinlu/robvis?branch=master)
17+
<br>
18+
[![DOI](https://img.shields.io/static/v1.svg?label=Publication&message=10.1002/jrsm.1411&color=informational)](https://doi.org/10.1002/jrsm.1411)
19+
[![metaverse
20+
Identifier](https://img.shields.io/static/v1.svg?label=Part%20of%20the&message=metaverse&color=informational)](https://www.github.com/rmetaverse/metaverse)
21+
22+
**UPDATE**: `robvis` now exists as a
23+
[web-app](https://mcguinlu.shinyapps.io/robvis), aimed at those who are
24+
not familiar with R or who want to explore the package’s functionality
25+
before installing it locally.
26+
27+
## Description
28+
29+
The `robvis` package takes the summary table from risk-of-bias
30+
assessments and produces plots formatted according to the assessment
31+
tool used.
32+
33+
## Getting started
34+
35+
Install the development version which contains new functionality and a
36+
range of bug fixes:
37+
38+
``` r
39+
install.packages("devtools")
40+
devtools::install_github("mcguinlu/robvis")
41+
```
42+
43+
To update the package, run the `install_github("mcguinlu/robvis")`
44+
command again.
45+
46+
If you wish to use the older CRAN version of the package, use the
47+
following command:
48+
49+
``` r
50+
install.packages("robvis")
51+
```
52+
53+
### Load data
54+
55+
To load your own data from a .csv file:
56+
57+
``` r
58+
mydata <- read.csv("path/to/mydata.csv", header = TRUE)
59+
```
60+
61+
To help users explore `robvis`, we have included example datasets in the
62+
package, one for each of the tool templates that currently exist within
63+
the package. The `data_rob2` dataset ([view it
64+
here](https://github.com/mcguinlu/robvis/blob/master/data_raw/data_rob2.csv)),
65+
which contains example risk-of-bias assessments performed using the
66+
RoB2.0 tool for randomized controlled trials, is used to create the
67+
plots in subsequent sections.
68+
69+
### Create plots
70+
71+
The package contains two plotting functions:
72+
73+
#### 1\. rob\_summary()
74+
75+
Returns a ggplot object displaying a bar-chart of the risk of bias of
76+
included studies across the domains of the specified tool. \[*Note: the
77+
defaults used in this function have changed from their original
78+
settings, so that a un-weighted barplot is now produced by default. See
79+
the NEWS.md file for further information.*\]
80+
81+
``` r
82+
summary_rob <- rob_summary(data = data_rob2, tool = "ROB2")
83+
84+
summary_rob
85+
```
86+
87+
<div style="text-align:center">
88+
89+
<img src=man/figures/robplot1.png width="70%" height="70%"/>
90+
91+
</div>
92+
93+
#### 2\. rob\_traffic\_light()
94+
95+
Returns a ggplot object displaying a [“traffic light
96+
plot”](https://handbook-5-1.cochrane.org/chapter_8/figure_8_6_c_example_of_a_risk_of_bias_summary_figure.htm),
97+
displaying the risk of bias judgment in each domain for each study.
98+
99+
``` r
100+
trafficlight_rob <- rob_traffic_light(data = data_rob2,
101+
tool = "ROB2",
102+
psize = 10)
103+
104+
trafficlight_rob
105+
```
106+
107+
<div style="text-align:center">
108+
109+
<img src=man/figures/robplot2.png width="70%" height="70%"/>
110+
111+
</div>
112+
113+
### Other functions
114+
115+
#### rob\_save()
116+
117+
Pass the `robvis` to this function, along with a destination file, to
118+
save your risk-of-bias plots using sensible defaults.
119+
120+
``` r
121+
rob_save(trafficlight_rob, "rob_fig.png")
122+
```
123+
124+
#### rob\_tools()
125+
126+
Outputs a list of the risk of bias assessment tools for which a template
127+
currently exists in rob\_summary(). We expect this list to be updated in
128+
the near future to include tools such as ROBIS (tool for assessing risk
129+
of bias in systematic reviews).
130+
131+
``` r
132+
rob_tools()
133+
#> Note: the "ROB2-Cluster" template is only available for the rob_traffic_light() function.
134+
#> [1] "ROB2" "ROB2-Cluster" "ROBINS-I" "QUADAS-2" "QUIPS"
135+
#> [6] "Generic"
136+
```
137+
138+
## Advanced usage
139+
140+
### Change the colour scheme
141+
142+
The `colour` argument of both plotting functions allows users to select
143+
from two predefined colour schemes (“cochrane” or “colourblind”) or to
144+
define their own palette by providing a vector of hex codes.
145+
146+
For example, to use the predefined “colourblind” palette:
147+
148+
``` r
149+
rob_summary(data = data_rob2,
150+
tool = "ROB2",
151+
colour = "colourblind")
152+
```
153+
154+
<div style="text-align:center">
155+
156+
<img src=man/figures/robplot3.png width="70%" height="70%"/>
157+
158+
</div>
159+
160+
And to define your own colour scheme:
161+
162+
``` r
163+
rob_summary(
164+
data = data_rob2,
165+
tool = "ROB2",
166+
colour = c("#f442c8",
167+
"#bef441",
168+
"#000000",
169+
"#d16684")
170+
)
171+
```
172+
173+
<div style="text-align:center">
174+
175+
<img src=man/figures/robplot4.png width="70%" height="70%"/>
176+
177+
</div>
178+
179+
### No “Overall” judgement
180+
181+
By default, both functions include an “Overall” risk of bias domain. To
182+
prevent this, remove the overall column from your dataset and set
183+
`overall = FALSE`.
184+
185+
``` r
186+
summary_rob <- rob_summary(data = data_rob2[1:6], tool = "ROB2", overall = FALSE)
187+
summary_rob
188+
```
189+
190+
<div style="text-align:center">
191+
192+
<img src=man/figures/robplot5.png width="70%" height="70%"/>
193+
194+
</div>
195+
196+
``` r
197+
rob_traffic_light(data = data_rob2[1:6],
198+
tool = "ROB2",
199+
overall = FALSE)
200+
```
201+
202+
<div style="text-align:center">
203+
204+
<img src=man/figures/robplot6.png width="70%" height="70%"/>
205+
206+
</div>
207+
208+
### Editing the plots
209+
210+
Finally, because the output (`summary_rob` and `trafficlight_rob` in the
211+
examples above) is a ggplot2 object, it is easy to adjust the plot to
212+
your own preferences.
213+
214+
For example, to add a title:
215+
216+
``` r
217+
library(ggplot2)
218+
219+
rob_summary(data = data_rob2, tool = "ROB2") +
220+
ggtitle("Summary of RoB 2.0 assessments")
221+
```
222+
223+
<div style="text-align:center">
224+
225+
<img src=man/figures/robplot7.png width="70%" height="70%"/>
226+
227+
</div>
228+
229+
## Examples of `robvis` in published papers
230+
231+
- Perivoliotis, Konstantinos, et al. “[Comparing the efficacy and
232+
safety of laparoscopic and robotic adrenalectomy: a meta-analysis
233+
and trial sequential
234+
analysis.](https://link.springer.com/article/10.1007/s00423-020-01860-9)
235+
Langenbeck’s Archives of Surgery (2020): 1-11.
236+
- Adile, Ashley A., et al. “[Salvage therapy for progressive,
237+
treatment-refractory or recurrent pediatric medulloblastoma: a
238+
systematic review
239+
protocol.](https://systematicreviewsjournal.biomedcentral.com/articles/10.1186/s13643-020-01307-8)
240+
Systematic Reviews 9.1 (2020): 1-9.
241+
- Tanneru, Karthik, et al. “[Meta-analysis and systematic review of
242+
intermediate-term follow-up of prostatic urethral lift for benign
243+
prostatic
244+
hyperplasia.](https://link.springer.com/article/10.1007/s11255-020-02408-y)
245+
International Urology and Nephrology (2020): 1-10.
246+
- Veloso, Andreia, et al.. “[Effectiveness of Cognitive Training for
247+
School-Aged Children and Adolescents With Attention
248+
Deficit/Hyperactivity Disorder: A Systematic
249+
Review.](https://www.frontiersin.org/articles/10.3389/fpsyg.2019.02983/full)
250+
Frontiers in Psychology 10 (2020): 2983.
251+
- Simillis, Constantinos, et al. “[Postoperative chemotherapy improves
252+
survival in patients with resected high‐risk stage II colorectal
253+
cancer: results of a systematic review and
254+
meta‐analysis.](https://onlinelibrary.wiley.com/doi/pdf/10.1111/codi.14994)
255+
Colorectal Disease (2020).
256+
- Habadi, Mohammed Ibrahim, et al. “[Prevalence of Panic Disorders in
257+
the Primary Health Care Setting: A Systematic Review and
258+
Meta-Analysis.](https://www.ecronicon.com/ecmi/pdf/prevalence-of-panic-disorders-in-the-primary-health-care-setting-a-systematic-review-and-meta-analysis.pdf)
259+
EC Microbiology 16.1 (2019): 01-09.
260+
- Gibb, Kate, et al. “[The consistent burden in published estimates of
261+
delirium occurrence in medical inpatients over four decades: a
262+
systematic review and meta-analysis
263+
study.](https://www.medrxiv.org/content/medrxiv/early/2019/08/29/19005165.full.pdf)
264+
medRxiv (2019): 19005165.
265+
266+
See more
267+
[here](https://scholar.google.com/scholar?cites=12564214960529060925&as_sdt=2005&sciodt=0,5&hl=en).
268+
269+
## Code of conduct
270+
271+
Please note that the ‘robvis’ project is released with a [Contributor
272+
Code of
273+
Conduct](https://github.com/mcguinlu/robvis/blob/master/CODE_OF_CONDUCT.md).
274+
By contributing to this project, you agree to abide by its terms.
275+
276+
## License
277+
278+
This project is licensed under the MIT License - see the
279+
[LICENSE.md](https://github.com/mcguinlu/robvis/blob/master/LICENSE)
280+
file for details.
281+
282+
## Acknowledgments
283+
284+
- The `rob_summary()` function was based on code forwarded by a
285+
colleague. I recently discovered that this code was adapted from
286+
that presented in the wonderful “[Doing Meta-Analysis in
287+
R](https://bookdown.org/MathiasHarrer/Doing_Meta_Analysis_in_R/plotting-the-summary.html)
288+
guide, so I would like to acknowledge the authors here.
289+
- [Emily Kothe](https://github.com/ekothe) for help in fixing
290+
`ggplot2` coding issues.
291+
- [Eliza Grames](https://github.com/elizagrames) for creating the
292+
`robvis` hex sticker.
293+
294+
### Research notice
295+
296+
Please note that this repository is participating in a study into
297+
sustainability of open source projects. Data will be gathered about this
298+
repository for approximately the next 12 months, starting from June
299+
2021.
300+
301+
Data collected will include number of contributors, number of PRs, time
302+
taken to close/merge these PRs, and issues closed.
303+
304+
For more information, please visit [the informational
305+
page](https://sustainable-open-science-and-software.github.io/) or
306+
download the [participant information
307+
sheet](https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf).

man/figures/robplot1.png

402 KB
Loading

man/figures/robplot2.png

1.39 MB
Loading

man/figures/robplot3.png

402 KB
Loading

man/figures/robplot4.png

401 KB
Loading

man/figures/robplot5.png

382 KB
Loading

man/figures/robplot6.png

1.27 MB
Loading

man/figures/robplot7.png

442 KB
Loading

0 commit comments

Comments
 (0)