Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more informative error if data has zero rows #29

Closed
nrennie opened this issue Jun 27, 2023 · 0 comments · Fixed by #33
Closed

Add more informative error if data has zero rows #29

nrennie opened this issue Jun 27, 2023 · 0 comments · Fixed by #33
Assignees
Labels
bug Something isn't working

Comments

@nrennie
Copy link
Owner

nrennie commented Jun 27, 2023

If data has been filtered and ended up with zero rows but the columns from and to still exist, this results in a non-informative error.

Example:

ggflowchart(tibble(from = c("A"), to = c("B")) |> filter(from != "A"))

returns:

Error in `dplyr::filter()`:
ℹ In argument: `.data$arrow_direction == "down"`.
Caused by error in `.data$arrow_direction`:
! Column `arrow_direction` not found in `.data`.
Run `rlang::last_trace()` to see where the error occurred.

Add a check somewhere.

@nrennie nrennie added the bug Something isn't working label Jun 27, 2023
@nrennie nrennie self-assigned this Jun 27, 2023
@nrennie nrennie mentioned this issue Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant