Skip to content

Confusing error with flowchart - inserting single box after a split causes error #72

@aghaynes

Description

@aghaynes

I tried to add some labels to a flow chart, similar to those in the consort flow (for allocation, followup etc). They're rather headings more than part of the flow itself. I got a confusing error, that doesn't really help resolve anything...

flowchart(
  rando = glue("Randomised N = 100"),
  groups = list(
    glue("Group1\nn = 50"), 
    glue("Group2\nn = 50")
  ),
  groups2 = list(
    glue("Excluded\nn = {1}"), 
    glue("Excluded\nn = {2}")
  ), 
  groups3 = list(
    glue("Analysed\nn = {49}"), 
    glue("Analysed\nn = {48}")
  )
) |> 
  insert(boxGrob("Followup"), 
         after = "groups")
Fehler in coords(prev_box) : 
  Assertion on 'box' failed: Must inherit from class 'box', but has class 'list'.

(in another example using a list of length 1 rather than the boxGrob directly, i got this error: Fehler in coords(next_box) : Assertion on 'box' failed: Must inherit from class 'box', but has classes 'Gmisc_list_of_boxes','list'.

It's fine it I put it above the split groups, but after it, it causes the error, so I assume it's to do with the grouped values.

This is the sort of thing I'm aiming for

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions