adayim / consort

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

Vignette manual example fails at add_split #1

Closed alansz closed 2 years ago

alansz commented 2 years ago

R version 3.6.0 (2019-04-26), tidyverse. The following code from the vignette (with the pipe tweaked):

library(consort)
txt1 <- "Population (n=300)"
txt1_side <- "Excluded (n=15):\n\u2022 MRI not collected (n=3)\n\u2022 Tissues not collected (n=4)\n\u2022 Other (n=8)"
g <- add_box(txt = txt1) %>%
  add_side_box(txt = txt1_side) %>%
  add_box(txt = "Randomized (n=200)") %>%
  add_split(txt = c("Arm A (n=100)", "Arm B (n=100)"))

Fails at add_split with:

Error in get_dist(y_s, y_e) : (list) object cannot be coerced to type 'double'

adayim commented 2 years ago

Thanks for reporting this. I can replicate the problem. I think this is caused by the different version of grid package. Will submit a new one to address this issue.

adayim commented 2 years ago

Can you install package from Github? I have fixed this and should work now. I will publish to CRAN if this works for you.

alansz commented 2 years ago

Yes, the vignette code now works. Thank you!

Quoting Alim Dayim @.***):

Can you install package from Github? I have fixed this and should work now. I will publish to CRAN if this works for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. *

adayim commented 2 years ago

Thank you for the feedback, the package in the CRAN now and I am closing this issue.