View source: R/5-flowchart_plot.R
flowchart_plot | R Documentation |
Uebernommen aus library(diagram)
simple_consort_plot() simple consort plot with the help of Filter2().
#' S3 function to draw a Consort flow diagram chart. Stolen from https://cran.r-project.org/web//packages/visR/index.html
https://cran.r-project.org/web//packages/visR/vignettes/Consort_flow_diagram.html
flowchart_plot(
txt,
txt_length = 30,
cex = 0.9,
arr.pos = 0.55,
box.size = c(0.1, 0.15),
use_str_wrap = TRUE,
...
)
simple_consort_plot(x, ...)
visr_copy(x, ...)
## Default S3 method:
visr_copy(x, ...)
## S3 method for class 'attrition'
visr_copy(
x,
description_column_name = "Criteria",
value_column_name = "Remaining.N",
complement_column_name = "",
box_width = 50,
font_size = 12,
fill = "white",
border = "black",
...
)
txt |
ist liste mit den Inhalten |
txt_length |
Zeilenumbruch |
cex |
schriftgroesse |
arr.pos |
Pfeilspitze |
box.size |
vektor der Box und zwar für links und rechts |
use_str_wrap |
workaround fuer new-lines = TRUE, |
... |
an visr_copy |
x |
data.frame |
plot
txt<-"AAA" #LETTERS[sample.int(23,1)]
flowchart_plot(list(
File=txt,
Raw.x=c("B","C"),
Clean.Up = c("D",paste("E",format(Sys.time(), "%Y-%m-%d")) ),
Analyse=c( "F", "G")
),
box.size=c(.1,.12) )
data(DFdummy, package = "stp25data")
DF1 <- DFdummy |> stp25tools::filter2(study.agreement)
attr(DF1, "filter")
simple_consort_plot(DF1)
DF2 <- DF1 |> stp25tools::filter2(
st.p.sars.cov2 == "nein",
!is.na(spike.igg.3.impfung),
!is.na(MPN)
)
DF3 <- DF2 |> stp25tools::filter2(
study.agreement,
sero.negativ.after.dose.2,
!is.na(spike.igg.3.impfung),
!is.na(spike.igg.4.impfung),
spike.igg.3.impfung == "<7.1 BAU/ml"
)
dat <- prepare_consort(DF1, DF2, DF3)
consort::consort_plot(
dat,
orders = c(
Trial.Nr = "Population",
Condition.1 = "Excluded",
Trial.Nr = "Allocated \nDeskriptive Analyse",
Condition.2 = "Fehlende Daten",
Trial.Nr = "Regressionsanalyse",
Condition.3 = "Not evaluable for the final analysis",
Trial.Nr = "Final Analysis"
),
side_box = c("Condition.1", "Condition.2", "Condition.3"),
cex = 0.9
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.