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

Tests fail if {rsgeo} is not installed #563

Closed
Robinlovelace opened this issue Jul 31, 2024 · 0 comments
Closed

Tests fail if {rsgeo} is not installed #563

Robinlovelace opened this issue Jul 31, 2024 · 0 comments

Comments

@Robinlovelace
Copy link
Member

From CRAN checks:

  > # rsgeo implementation (default if available):
  > if (rlang::is_installed("rsgeo")) {
  +   rsmulti = line_segment(l, segment_length = 1000, use_rsgeo = TRUE)
  +   plot(rsmulti["ID"])
  + }
  > # Check they have the same total length, to nearest mm:
  > # round(sum(st_length(l_seg_multi)), 3) == round(sum(st_length(rsmulti)), 3)
  > # With n_segments for 1 line:
  > l_seg_multi_n <- line_segment(l[1, ], n_segments = 3, use_rsgeo = FALSE)
  > l_seg_multi_n <- line_segment(l$geometry[1], n_segments = 3, use_rsgeo = FALSE)
  > l_seg_multi_n <- line_segment(l$geometry[1], n_segments = 3, use_rsgeo = TRUE)
  Error in loadNamespace(x) : there is no package called ‘rsgeo’

Source: https://cran.r-project.org/web/checks/check_results_stplanr.html

cc @JosiahParry I plan to work on this and put in a PR for you to review. If you have any quickfire suggestions let me know.

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