adayim / consort

Create CONSORT diagrams for clinical studies.
Other
28 stars 4 forks source link

Pooling split boxes into one box #6

Closed abduazizR closed 1 year ago

abduazizR commented 1 year ago

Hi,

I am not sure if this is supported by the package or not, but I am wondering if it's possible to do something like the following. In particular, I would like to know if I can pool the two separate boxes into a single box image

Thanks

adayim commented 1 year ago

Sorry, this package can't do this for now. This flow chart is a bit complicated. I don't think this is a correct consort diagram. I don't think the expression of this diagram is correct. You can have one randomised number, not another final randomised.

abduazizR commented 1 year ago

I believe you're right. I am just asking because I am working with observational data so we pool databases from different resources into one analytic cohort that we use for the analysis. Could you recommend me another tool\package that can aid me to do such a thing?

Thanks

adayim commented 1 year ago

You can do combine these now with the latest version. It only supports the DiagrammeR output.

g <- add_box(txt = c("Study 1 (n=8)", "Study 2 (n=12)"))
g <- add_box(g, txt = "Included All (n=20)")
g <- add_side_box(g, txt = "Excluded (n=7):\n\u2022 MRI not collected (n=3)")
g <- add_box(g, txt = "Randomised")
g <- add_split(g, txt = c("Arm A (n=143)", "Arm B (n=142)"))
g <- add_box(g, txt = "Combine all")
plot(g, grViz = TRUE)

Will fix the grid output later. Thank you for the suggestions.