consort_from_metadata {consortr} | R Documentation |
Function to generate consort diagrams
Description
Function to generate consort diagrams
Usage
consort_from_metadata(metadata, data)
Arguments
metadata |
Metadata downloaded from shiny app |
data |
Data uploaded to the app for generating consort diagram |
Value
graph created by DiagrammeR (graph object of class dgr_graph)
Examples
data <- data.frame(a = c('m', 'm', 'n', 'n'),
b = c('p', 'p', 'q', 'q'))
metadata <- data.frame(label = c('All', "a=='m'"),
code = c(TRUE, "a=='m'"),
parent = c(0, 1),
color = c("black", "black"),
hidden = c(FALSE, FALSE),
split_var = c('a', NA))
consort_diagram <- consort_from_metadata(metadata, data)
[Package consortr version 0.9.1 Index]