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

check_graph should be able to return a list of loops. #7

Closed
dblodgett-usgs opened this issue Apr 19, 2023 · 0 comments
Closed

check_graph should be able to return a list of loops. #7

dblodgett-usgs opened this issue Apr 19, 2023 · 0 comments

Comments

@dblodgett-usgs
Copy link
Collaborator

Currently not exported, it would be cool to export check_graph() and allow it to return the issue ids.

# LOOPS!!! 
flow_table <- flow_table |>
  filter(id %in% fl$id) |>
  mutate(toid = ifelse(!toid %in% id, "", toid)) |>
  mutate(r = 1:n())

remove <- left_join(flow_table, flow_table, 
               by = c("toid" = "id")) |>
  filter(id == toid.y) |>
  pull(r.x)

flow_table <- filter(flow_table, !r %in% remove) |>
  select(-r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant