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

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'coordnames': subscript out of bounds #6

Closed
joshilpa-cg opened this issue Apr 15, 2022 · 7 comments

Comments

@joshilpa-cg
Copy link

Getting this error when using nkde function

@JeremyGelb
Copy link
Owner

Hello ! Thank you for your interest in spNetwork. To be able to help you I need to know :
What version of spNetwork are you using ?
The exact code you are using (from data loading to the line with the error).
And the data you are using (what type of file and if possible a sample).
If your bug is not a simple error in the package use, I will probably need a minimal example with a sample of data to reproducd it.

@joshilpa-cg
Copy link
Author

joshilpa-cg commented Apr 18, 2022 via email

@JeremyGelb
Copy link
Owner

Hello !

It is great that you managed to resolve your first issue. Let me clarify some points:

  1. localmoran is not a part of spNetwork. If you have an error or a bug with this specific function, I am powerless.
  2. Error in cut.default(lx, c(-Inf, lxx, Inf), labels = lbs) is VERY likely related to a mapping function and again is not related to spNetwork
  3. pal being undefined means that the object pal is not defined in your environment, you probably missed a line of code somewhere.

Once again, I can not really help for debugging if you post here only some little part of code and error messages. Please consider providing the FULL code leading to the error. Moreover, this is not the right place for trouble shouting error which are not caused by spNetwork (like pal being undefined or cut.default(lx, c(-Inf, lxx, Inf), labels = lbs)).

@joshilpa-cg
Copy link
Author

joshilpa-cg commented Apr 19, 2022 via email

@JeremyGelb
Copy link
Owner

Dear Shilpa Joshi.

Thank you again for your interest in spNetwork.

I do not have the time to generate some data myself and test your network, but if you can provide me a sample of data and the code producing the error, I would be happy to help.

I have an idea about what could cause the error. The code in the paper is based on a previous version of spNetwork (0.2.1) and the new version on github (0.4.x) is now using the sf library rather than sp (because of rgdal and rgeos deprecation).
Please consider installing the latest version (remotes::install_github(JeremyGelb/spNetwork)) and retry with the examples provided on the website of the package : https://jeremygelb.github.io/spNetwork/

About the network distance, it depends on the function you are using. If you are using nkde like functions, it is a distance in meters along the network.

Snapping means projecting the points exactly on the lines of the network (on the nearest line).

@JeremyGelb
Copy link
Owner

Dear Shilpa Joshi,

have you been able to conduct your analysis? In that case, I would close this issue. Otherwise, Have you tried with the new version of spNetwork available on CRAN or github?

@joshilpa-cg
Copy link
Author

joshilpa-cg commented May 23, 2022 via email

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