Describe the bug
I think the error when running edge_length with active nodes could be more explicit. For example, we could copy the same workflow as in tidygraph.
Reproducible example
library(sfnetworks)
library(tidygraph)
#>
#> Attaching package: 'tidygraph'
#> The following object is masked from 'package:stats':
#>
#> filter
sfn <- as_sfnetwork(roxel)
# Unclear error
sfn %>%
arrange(edge_length())
#> Error in `st_as_sf()`:
#> ! Problem with the implicit `transmute()` step.
#> ✖ Problem while computing `..1 = edge_length()`.
#> ✖ `..1` must be size 701 or 1, not 851.
# Better explanation
sfn %>%
filter(edge_is_loop())
#> Error in `stopifnot()`:
#> ! Problem while computing `..1 = edge_is_loop()`.
#> Caused by error in `expect_edges()`:
#> ! This call requires edges to be active
Describe the bug I think the error when running edge_length with active nodes could be more explicit. For example, we could copy the same workflow as in tidygraph.
Reproducible example
Created on 2022-06-27 by the reprex package (v2.0.1)
Expected behavior A better error message
R Session Info (Will add later)