It would be nice to support this more gracefully. Two initial thoughts:
When row numbers are different, bind together into list-columns. This always works but is a little convoluted, and should probably output a warning or at least a message.
In addition to the above, also offer and option to pivot (and unnest) the columns to be in a long format -- so, in the above example, the output could be pivoted so that pre and post group names are in a column , with the rows also in a column.
Currently
specify
generates a warning and no output when arguments have differing numbers of rows:Created on 2022-01-20 by the reprex package (v2.0.1)
It would be nice to support this more gracefully. Two initial thoughts:
pre
andpost
group names are in a column , with the rows also in a column.