Skip to content

Instantly share code, notes, and snippets.

@mcguinlu
Last active November 26, 2020 14:55
Show Gist options
  • Save mcguinlu/531a5f49875088e8b72602c33bb93c55 to your computer and use it in GitHub Desktop.
Save mcguinlu/531a5f49875088e8b72602c33bb93c55 to your computer and use it in GitHub Desktop.
devtools::install_github("nealhaddaway/PRISMA2020")
library(PRISMA2020)
# This is the template CSV file, available from the PRISMA2020 repo
# You'll need to edit the numbers in this file to update the image
data <- read.csv("https://raw.githubusercontent.com/nealhaddaway/PRISMA2020/master/inst/extdata/PRISMA.csv",
stringsAsFactors = FALSE)
# Set the data as PRISMA data
data <- read_PRISMAdata(data)
# Create the plot
plot <- PRISMA_flowchart(data,
interactive = FALSE,
previous = FALSE,
other = FALSE)
# Capture outputs
# PDF Output
rsvg::rsvg_pdf(svg = charToRaw(DiagrammeRsvg::export_svg(plot)),
file = "prisma-flow.pdf")
# PNG Output
rsvg::rsvg_png(svg = charToRaw(DiagrammeRsvg::export_svg(plot)),
file = "prisma-flow.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment