Arcadia-Science / sourmashconsumr

Working with the outputs of sourmash in R
https://arcadia-science.github.io/sourmashconsumr/
Other
21 stars 3 forks source link

add `tidyr::drop_na()` to sankey plot function to avoid errors/warnings and inaccurate plots #62

Open taylorreiter opened 1 year ago

taylorreiter commented 1 year ago

I had three data points with NAs in a recent sankey plot and i got the following errors and warnings and weird looking plots. this could be fixed with a drop_na filtering step. Could be parameterized, or just documented so the user knows this is happening.

Warning messages:
1: Removed 3 rows containing non-finite values (`stat_parallel_sets()`). 
2: Removed 3 rows containing non-finite values (`stat_parallel_sets_axes()`). 
3: Computation failed in `stat_parallel_sets_axes()`
Caused by error in `compute_panel()`:
! Axis aesthetics must be constant in each split 
4: Removed 3 rows containing non-finite values (`stat_parallel_sets_axes()`). 
5: Computation failed in `stat_parallel_sets_axes()`
Caused by error in `compute_panel()`:
! Axis aesthetics must be constant in each split