-
Notifications
You must be signed in to change notification settings - Fork 6
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
Handling NA input values #34
Comments
Thanks for the examples! decode
My instinct tells me a data.frame with two NA values, to keep the structure consistent.
yes please :) encodeYes these cases need to be handled. My first thoughts are to either
What do you think to these options? |
So full disclaimer, I actually have never used googlePolylines, so I don't have a strong take what makes the most sense on how to handle these cases. I was just poking around this repo after seeing the cool stuff being done with Having said that, for the decode example, I agree that returning a data frame is probably better. Looking at the list output, I could see wanting to Also, I was playing around with the decode Rcpp functions, and modifyed it so that it's not having to create a new |
absolutely! Always keen to see & learn from others. |
@ChrisMuir did you look at the If not I might move them into a separate issue and make them part of the v0.7.3 milestone |
Nope, I addressed the |
Moved the |
I ran into a few instances of
encode()
anddecode()
handling NA inputs in interesting ways. Here are some examples:decode()
Should this return
NA_real_
, or a data frame containing two NA values? Either could be done within the Rcpp functionrcpp_decode_polyline()
without much trouble or additional code. I'd be happy to submit a PR for this if you'd like.encode()
Example 1:
NA
inputs round-tripped throughencode/decode
return numeric lat/lon coordinates.Example 2:
Data frame with four observations round-tripped through
encode/decode
returns a data frame with only three observations.The text was updated successfully, but these errors were encountered: