Creates CONSORT-style flowcharts showing participant flow through studies
Usage
flowchart(
data,
nodes,
counts,
direction = "TB",
nodeWidth = 2.5,
nodeHeight = 1,
fontSize = 10,
showPercentages = TRUE,
showExclusions = TRUE,
nodeColor = "blue",
includeTitle = TRUE
)
Arguments
- data
The data as a data frame.
- nodes
Variables containing node descriptions/labels
- counts
Variables containing counts for each node
- direction
Direction of flowchart flow
- nodeWidth
.
- nodeHeight
.
- fontSize
.
- showPercentages
Show percentage of initial participants at each step
- showExclusions
Show exclusion counts on edge labels
- nodeColor
Color scheme for nodes
- includeTitle
Include automatic title with flow statistics
Value
A results object containing:
results$todo | a html | ||||
results$diagram | an image | ||||
results$nodeData | a table |
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$nodeData$asDF
as.data.frame(results$nodeData)