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

spatialrd return "unused argument" error #2

Open
Julio-Mugnol opened this issue May 22, 2023 · 1 comment
Open

spatialrd return "unused argument" error #2

Julio-Mugnol opened this issue May 22, 2023 · 1 comment

Comments

@Julio-Mugnol
Copy link

Trying to execute the function spatialrd returns

Error in s2::s2_distance_matrix(x, y, ...) : 
  unused argument (drop = TRUE)

While calculating the distances from the cutoff points with sf::st_distance, it appears this argument is passed on to s2::s2_distance_matrix, which does not support it and returns the previous error. I was unable to make the function work by changing the arguments, and I'm pretty sure my data is in the right format

@axlehner
Copy link
Owner

axlehner commented Jul 31, 2023

Hello,
This is most probably related to recent changes in sf. Please try switching off s2 with sf::sf_use_s2(FALSE). The ideal solution, however, would be to check the CRS of your spatial data. It could be that you are using what the sf maintainers call "an old-style CRS object" that does not use WKT2.

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

2 participants