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 if (any(idx)) { : missing value where TRUE/FALSE needed #48

Closed
UNFPAmaldives opened this issue Jul 7, 2019 · 1 comment
Closed
Labels

Comments

@UNFPAmaldives
Copy link

UNFPAmaldives commented Jul 7, 2019

I get the following error message when I try to generate isochrones for the point given below (in Bethel, Alaska):

iso <- osrmIsochrone(loc = c(-161.8703202,60.76931), breaks = seq(from = 0,to = 60, by = 20))
Error in if (any(idx)) { : missing value where TRUE/FALSE needed

When I try adjusting the to and by values to less than 10 minutes (e.g. to = 60, by = 20) ), the command works. I suspect this is because the roads in Bethel, Alaska, don't extend much beyond 10 minutes of travel time. Can you confirm that this is the reason for the error message?

If this is so, I would have expected that osrmIsochrone would at least return the isochrones for which there were non-missing, valid travel times. Or an option so that I could set osrmIsochrone to return the maximum travel time within a closed road network, given certain min/max/break parameters.
And perhaps a more descriptive error message.

If I have to plot 1,000 isochrones within Alaska, Hawaii, or other isolated areas for analysis, this is an error that's going to come up a lot — without a clear or systematic way of resolving it yet.

@rCarto
Copy link
Member

rCarto commented Jul 8, 2019

Hello,
It seems you have found the origin of the problem. Unfortunately, I probably won't have the time to fix it in the following two weeks. In the meantime, feel free to submit a pull request if you can. Otherwise I'll have a deeper look into the issue at the end of July...

@rCarto rCarto added the bug label Jul 11, 2019
@rCarto rCarto closed this as completed in 6a6f926 Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants