Skip to content

Commit c0ab208

Browse files
committed
Updated dependencies and vignetter
1 parent f832991 commit c0ab208

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Encoding: UTF-8
1212
LazyData: true
1313
RoxygenNote: 6.1.1
1414
Imports:
15-
tidyverse
15+
ggplot2

R/rob_summary_plot.R

+2-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ rob_summary <- function(data, tool, save = "No") {
1010

1111
if (tool == "ROB2") {
1212
data.tmp <- data
13-
print("Renaming columns...")
1413
names(data.tmp)[2] <- "Bias due to randomisation"
1514
names(data.tmp)[3] <- "Bias due to deviations from intended intervention"
1615
names(data.tmp)[4] <- "Bias due to missing data"
@@ -23,9 +22,8 @@ if (tool == "ROB2") {
2322
domain, judgement,
2423
-Weight))
2524

26-
print("Data tidied")
27-
2825
rob.tidy$judgement <- as.factor(rob.tidy$judgement)
26+
2927
rob.tidy$domain <- as.factor(rob.tidy$domain)
3028

3129
rob.tidy$domain <- factor(rob.tidy$domain,
@@ -81,7 +79,6 @@ if (tool == "ROBINS-I") {
8179
start <- 2
8280
end <- 9
8381
data.tmp <- data
84-
print("Renaming columns...")
8582
names(data.tmp)[2] <- "Bias due to confounding"
8683
names(data.tmp)[3] <- "Bias due to selection of participants"
8784
names(data.tmp)[4] <- "Bias in classification of interventions"
@@ -94,7 +91,6 @@ if (tool == "ROBINS-I") {
9491
domain, judgement,
9592
start:end,
9693
-Weight))
97-
print("Data tidied")
9894

9995
rob.tidy$judgement <- as.factor(rob.tidy$judgement)
10096

@@ -167,9 +163,7 @@ if (tool == "QUADAS-2") {
167163
domain, judgement,
168164
start:end,
169165
-Weight))
170-
print("Data tidied")
171-
172-
rob.tidy$judgement <- as.factor(rob.tidy$judgement)
166+
rob.tidy$judgement <- as.factor(rob.tidy$judgement)
173167

174168
rob.tidy$domain <- as.factor(rob.tidy$domain)
175169

@@ -227,7 +221,6 @@ if (tool == "QUADAS-2") {
227221
extension <- paste(save)
228222
filename <- paste(tool, "_summary_figure",extension, sep = "")
229223
ggplot2::ggsave(filename, width = 8, height = 2.41)
230-
print("Figure saved")
231224
}
232225

233226
return(plot)

robvis.Rproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ StripTrailingWhitespace: Yes
1818
BuildType: Package
1919
PackageUseDevtools: Yes
2020
PackageInstallArgs: --no-multiarch --with-keep.source
21-
PackageRoxygenize: rd,collate,namespace
21+
PackageRoxygenize: rd,collate,namespace,vignette

vignettes/Introduction to robvis.Rmd

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
11
---
22
title: "Introduction to robvis"
3-
author: "LAM"
3+
author: "Luke A McGuinness"
44
date: "`r Sys.Date()`"
55
vignette: >
66
%\VignetteIndexEntry{Introduction to robvis}
77
%\VignetteEngine{knitr::rmarkdown}
88
%\VignetteEncoding{UTF-8}
99
---
10-
1110
```{r setup, include=FALSE}
1211
knitr::opts_chunk$set(
1312
collapse = TRUE,
1413
comment = "#>",
1514
warning = FALSE,
1615
fig.width = 8,
1716
fig.height = 2.41)
18-
library(tidyverse)
19-
library(robvis)
17+
library(ggplot2)
18+
library(robvis)
2019
```
21-
## R Markdown
20+
## Introduction to robvis, a visualisation tool for risk-of-bias assessments
2221

22+
The tool takes the summary table from risk-of-bias assessments, produces a summary plot (incorporating some measure of weighting for each study), and formats the plot by the tool used.
2323

24+
### RoB2.0 tool for randomised controlled trials
2425

2526
```{r rob2summary}
26-
#Import data for ROB2.0 based risk-of-bias assessments
27-
27+
# data_rob: example dataset for ROBINS-I tool
2828
# Produce barchart summarising risk of bias for each domain, weighted by study precision.
29-
robvis::rob_summary(robvis::data_rob, tool = "ROB2", save = "No")
29+
rob_summary(data_rob, tool = "ROB2", save = "No")
3030
```
3131

3232
Users can also produce summary plots for two other commonly used tools: ROBINS-I and QUADAS-2
3333

34+
### ROBINS-I tool for non-randomised studies of interventions
3435
```{r robinssummary}
35-
#Import data for ROB2.0 based risk-of-bias assessments
36+
# data_robins: example dataset for ROBINS-I tool
3637
# Produce barchart summarising risk of bias for each domain, weighted by study precision.
37-
robvis::rob_summary(data_robins, tool = "ROBINS-I", save = "No")
38+
rob_summary(data_robins, tool = "ROBINS-I", save = "No")
3839
```
3940

41+
42+
### QUADAS-2 for diagnostic test accuracy studies
4043
```{r quadassummary}
4144
#Import data for ROB2.0 based risk-of-bias assessments
4245
# Produce barchart summarising risk of bias for each domain, weighted by study precision.
43-
robvis::rob_summary(data_quadas, tool = "QUADAS-2", save = "No")
46+
rob_summary(data_quadas, tool = "QUADAS-2", save = "No")
4447
```

0 commit comments

Comments
 (0)