-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with rob_summary and rob_traffic_light #131
Comments
Thank you for the suggestion! I added an example below. Don't mind the column names for the domains, but you can see doverall_applicability (doverall_a) doesn't make it into the summary plot and, and that rob_traffic_light plot gives an error. library(tibble)
library(robvis)
#> Warning: package 'robvis' was built under R version 4.0.5
library(reprex)
data <- tibble::tribble(
~ stud , ~ d1, ~ d2, ~ d3, ~ d4, ~ d1a, ~ d2a, ~ d3a, ~ doverall, ~ doverall_a, ~ weight,
"study1", "high", "high", "low", "low", "low", "high", "high", "high", "high", 1,
"study2", "low", "high", "low", "low", "low", "high", "low", "high", "low", 1,
"study2", "high", "high", "low", "low", "low", "high", "low", "high", "low", 1,
)
data <- as.data.frame(data)
rob_summary(data,tool='ROB1') rob_traffic_light(data=data, tool='ROB1')
#> Error: Aesthetics must be either length 1 or the same as the data (1): colour Created on 2021-06-08 by the reprex package (v0.3.0) |
I'm new to GitHub, so my apologies if I was supposed to quote reply the reprex to your comment. |
Hi @zaddyzad - no, that's perfect, thanks! Not entirely sure what is going on here, but will look into it and get back to you shortly. |
Hi @zaddyzad, I think I have worked out what is going on - you have the old CRAN version of the package installed which does not provide good handling of the "ROB1/Generic" template. In order to create your figures, please install the newest development version of the package using:
Once you have done that, running
using the data you provided will produced the barplot you are after (see below). In this case, the For the traffic light plot, things are a little bit more complicated. Installing the development version of the package will allow you to create the following plot using your example data: However, because I thought there would only ever b1 one "overall" column per plot, this doesn't look exactly right, as one overall column title is put into the caption with the other domains, and the other is left in the column heading. This is something I need to work on further in the package. As a stop-gap, my best recommendation is to produce two traffic light plots, one for risk of bias and one for applicability, and merge them using patchwork:
Yo can then reference to "Figure X, Panel A" in the text. This is actually how I believe the results for tools with both risk of bias and applicability sections should be displayed, as I think it makes it a lot easier to interpret. Hopefully this helps! |
@mcguinlu Thank you so much for all this, it all works splendidly! PROBAST support would be a wonderful addition for subsequent versions of the tool. Thank you for also introducing me to the patchwork package. This will be very helpful in the future. |
Ideal - glad it worked out. And PROBAST is definitely on my list of tools to add. I'll close this issue now. |
I have two problems with the main functions of ROBVIS, help would be sincerely appreciated!
First problem, rob_summary:
I am using PROBAST and there 9 domains: 4 for RoB, 3 for applicability, and 2 for overall assessments. When I use rob_summary to plot the data, the plot only shows the first 8 domains.
The second problem is with rob_traffic_light:
When I try to plot the data, I get the error "Error: Aesthetics must be either length 1 or the same as the data (1): colour."
The code is here, and a picture of the plot is attached.
The text was updated successfully, but these errors were encountered: