Welcome to ClientVPS Mirrors

Help for package PRISMA2020

Package {PRISMA2020}


Title: Make Interactive 'PRISMA' Flow Diagrams
Version: 1.1.4
Description: Systematic reviews should be described in a high degree of methodological detail. The 'PRISMA' Statement calls for a high level of reporting detail in systematic reviews and meta-analyses. An integral part of the methodological description of a review is a flow diagram. This package produces an interactive flow diagram that conforms to the 'PRISMA2020' preprint. When made interactive, the reader/user can click on each box and be directed to another website or file online (e.g. a detailed description of the screening methods, or a list of excluded full texts), with a mouse-over tool tip that describes the information linked to in more detail. Interactive versions can be saved as HTML files, whilst static versions for inclusion in manuscripts can be saved as HTML, PDF, PNG, SVG, PS or WEBP files.
Imports: cpp11, DiagrammeR, DiagrammeRsvg, dplyr, htmltools, htmlwidgets, progress, rmarkdown, rsvg, scales, shiny, shinyjs, stats, stringr, utils, xml2, webp, DT, rio, tools, zip
License: MIT + file LICENSE
URL: https://github.com/prisma-flowdiagram/PRISMA2020
BugReports: https://github.com/prisma-flowdiagram/PRISMA2020/issues
Encoding: UTF-8
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-06-30 21:23:57 UTC; runner
Author: Neal Haddaway ORCID iD [aut], Luke McGuinness ORCID iD [aut], Chris Pritchard ORCID iD [aut, cre], Brennan Chapman [ctb], Hossam Hammady [ctb], Anders Kolstad ORCID iD [ctb], Shreya Dimri ORCID iD [ctb], Matt Lloyd Jones ORCID iD [ctb], John-o Kulas [ctb]
Maintainer: Chris Pritchard <chris@christopherpritchard.co.uk>
Repository: CRAN
Date/Publication: 2026-07-01 07:00:30 UTC

Description

Generate the javascript method to insert the side labels

Usage

PRISMA_add_hyperlink_(node, url)

Arguments

node

the relevent node

url

the URL the node should link to

Value

An interactive flow diagram plot.


Calculate the correct filetime

Description

Work out the correct filetype to save the file as

Usage

PRISMA_calc_filetype_(fn, ft)

Arguments

fn

The filename (including extension)

ft

The filetype (which can be NA or NULL)

Value

the filetype taken from the filename, or overriden by the ft param


Read in PRISMA flow diagram data

Description

Read in a template CSV containing data for the flow diagram

Usage

PRISMA_data(data)

Arguments

data

File to read in.

Value

A list of objects needed to plot the flow diagram

Examples

csvFile <- system.file("extdata", "PRISMA.csv", package = "PRISMA2020")
data <- read.csv(csvFile);
data <- PRISMA_data(data);

Pull from CSV, or use a default value if not in the CSV

Description

set the variable from the CSV, or a default value

Usage

PRISMA_default_or_csv_(expr, default, var_name = "not provided")

Arguments

expr

the expression to get the variable from the CSV

default

the default token

var_name

the variable name

Value

the result of 'expr', or 'default'


Plot interactive flow diagrams for systematic reviews

Description

Produces a PRISMA2020 style flow diagram for systematic reviews, with the option to add interactivity through tooltips (mouseover popups) and hyperlink URLs to each box. Data can be imported from the standard CSV template provided.

Usage

PRISMA_flowdiagram(
  data,
  interactive = FALSE,
  previous = TRUE,
  other = TRUE,
  detail_databases = FALSE,
  detail_registers = FALSE,
  meta_analysis = FALSE,
  fontsize = 7,
  font = "Helvetica",
  title_colour = "Goldenrod1",
  greybox_colour = "Gainsboro",
  main_colour = "Black",
  arrow_colour = "Black",
  arrow_head = "normal",
  arrow_tail = "none",
  side_boxes = TRUE
)

Arguments

data

List of data inputs including numbers of studies, box text, tooltips, and urls for hyperlinks. Data inputted via the PRISMA_data() function. If inputting individually, see the necessary parameters listed in the PRISMA_data()) function and combine them in a list using data <- list().

interactive

Logical argument TRUE or FALSE whether to plot interactivity (tooltips and hyperlinked boxes).

previous

Logical argument (TRUE or FALSE) specifying whether previous studies were sought.

other

Logical argument (TRUE or FALSE) specifying whether other studies were sought.

detail_databases

Logical argument (TRUE or FALSE) specifying whether to list specific databases.

detail_registers

Logical argument (TRUE or FALSE) specifying whether to list specific registers.

meta_analysis

Logical argument (TRUE or FALSE) specifying whether to display a box for meta-analysis

fontsize

The font size for text in each box. The default is '12'.

font

The font for text in each box. The default is 'Helvetica'.

title_colour

The colour for the upper middle title box (new studies). The default is 'Goldenrod1'. See 'DiagrammeR' colour scheme. https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#colors.

greybox_colour

The colour for the left and right column boxes. The default is 'Gainsboro'. See 'DiagrammeR' colour scheme https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#colors.

main_colour

The colour for the main box borders. The default is 'Black'. See 'DiagrammeR' colour scheme https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#colors.

arrow_colour

The colour for the connecting lines. The default is 'Black'. See 'DiagrammeR' colour scheme https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#colors.

arrow_head

The head shape for the line connectors. The default is 'normal'. See DiagrammeR arrow shape specification https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#arrow-shapes. #nolint

arrow_tail

The tail shape for the line connectors. The default is 'none'. See DiagrammeR arrow shape specification https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html#arrow-shapes. #nolint

side_boxes

Whether or not to include the blue label boxes along the side

Value

A flow diagram plot.

Examples

csvFile <- system.file("extdata", "PRISMA.csv", package = "PRISMA2020")
data <- read.csv(csvFile);
data <- PRISMA_data(data);
plot <- PRISMA_flowdiagram(data,
                fontsize = 12,
                interactive = TRUE,
                previous = FALSE,
                other = TRUE);
plot

Format numbers with commas into numbers

Description

Turn strings containing numbers +/- commas into numbers

Usage

PRISMA_format_number_(x)

Arguments

x

the number to format

Value

the number with commas removed


Formats multiple exclusion reasons properly for printing

Description

Parse an exclusion reason dataframe from PRISMA_parse_reasons_() and returns a properly formatted string

Usage

PRISMA_format_reasons_(df)

Arguments

df

the dataframe to parse

Value

a string ready for printing


Generate a temporary SVG from a plot object

Description

Generate and save a temporary SVG from a plot object

Usage

PRISMA_gen_tmp_svg_(obj)

Arguments

obj

the plot object

Value

the full path to the saved SVG


Calculate the correct height of a box from a list (e.g. of exclusion reasons)

Description

Get the correct height for a box

Usage

PRISMA_get_height_(n, offset, min = 2)

Arguments

n

the number of rows of text in the label

offset

the offset height (e.g. 3.5)

min

the minimum number of rows before adjusting

Value

the height of the box


Calculate the correct position of a node

Description

Get the correct position for a node

Usage

PRISMA_get_pos_(
  first_box_location,
  offset,
  length_orig,
  length_new,
  negative_offset = FALSE
)

Arguments

first_box_location

the location of the first node

offset

the offset from the first node

length_orig

the width/height of the original node

length_new

the width/height of the new node

negative_offset

is the offset negative (defaults to false)

Value

the position of the node


Generate / insert JS for labels

Description

Generate the javascript method to insert the side labels

Usage

PRISMA_insert_js_(plot, identification_text, screening_text, included_text)

Arguments

plot

the plot object (without side labels)

identification_text

the text to use as the "identification" label

screening_text

the text to use as the "screening" label

included_text

the text to use as the "identification" label

Value

the plot object (with JS to generate side labels)


Plot interactive flow diagram for systematic reviews

Description

Converts a PRISMA systematic review flow diagram into an interactive HTML plot, for embedding links from each box.

Usage

PRISMA_interactive_(plot, urls, previous, other)

Arguments

plot

A plot object from PRISMA_flowdiagram().

urls

A dataframe consisting of two columns: nodes and urls. The first column should contain 19 rows for the nodes from node1 to node19. The second column should contain a corresponding URL for each node.

previous

Logical argument (TRUE or FALSE) (supplied through PRISMA_flowdiagram()) specifying whether previous studies were sought.

other

Logical argument (TRUE or FALSE) (supplied through PRISMA_flowdiagram()) specifying whether other studies were sought.

Value

An interactive flow diagram plot.

See Also

PRISMA_interactive_()


Parse an exclusion reason into a data frame

Description

Parse an exclusion reason string and returns a dataframe containing reasons and number

Usage

PRISMA_parse_reasons_(reasons)

Arguments

reasons

the string to parse

Value

a dataframe containing reasons and number applicable


Save PRISMA2020 flow diagram

Description

Save the output from PRISMA_flowdiagram() to the working directory.

Usage

PRISMA_save(
  plotobj,
  filename = "PRISMA2020_flowdiagram.html",
  filetype = NA,
  overwrite = FALSE,
  width = NULL,
  height = NULL,
  css = NULL
)

Arguments

plotobj

A plot produced using PRISMA_flowdiagram().

filename

The filename to save (including extension)

filetype

The filetype to save the plot in, supports: HTML, ZIP, PDF, PNG, SVG, PS and WEBP (if NA, the filetype will be calculated out based on the file extension) HTML files maintain hyperlinks and tooltips The ZIP option creates an archive containing the HTML file, alongside supporting javascript and css files in an adjacent folder, instead of embedded base64 within the HTML file

overwrite

if TRUE, will overwrite an existing file

width

passed as the width argument to rsvg::rsvg() and similar functions

height

passed as the height argument to rsvg::rsvg() and similar functions

css

passed as the css argument to rsvg::rsvg() and similar functions

Value

the absolute filename of the saved diagram plot.

Examples

csvFile <- system.file("extdata", "PRISMA.csv", package = "PRISMA2020")
data <- read.csv(csvFile);
data <- PRISMA_data(data);
plot <- PRISMA_flowdiagram(data,
                fontsize = 12,
                interactive = TRUE,
                previous = FALSE,
                other = TRUE);
PRISMA_save(plot, filename = tempfile(), filetype="html");

Defunct function - replaced by "PRISMA_data"

Description

Defunct function - replaced by "PRISMA_data"

Usage

read_PRISMAdata(data)

Arguments

data

File to read in.

See Also

PRISMA_data()


Defunct function - replaced by "PRISMA_interactive_"

Description

Defunct function - replaced by "PRISMA_interactive_"

Usage

sr_flow_interactive(plot, urls, previous, other)

Arguments

plot

A plot object from PRISMA_flowdiagram().

urls

A dataframe consisting of two columns: nodes and urls. The first column should contain 19 rows for the nodes from node1 to node19. The second column should contain a corresponding URL for each node.

previous

Logical argument (TRUE or FALSE) (supplied through PRISMA_flowdiagram()) specifying whether previous studies were sought.

other

Logical argument (TRUE or FALSE) (supplied through PRISMA_flowdiagram()) specifying whether other studies were sought.

See Also

PRISMA_interactive_()

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.