ropensci / parzer

Parse geographic coordinates
https://docs.ropensci.org/parzer
Other
63 stars 6 forks source link

Convert all Rcpp::CharacterVector inputs directly to std::vector<std::string> #43

Closed mpadge closed 1 year ago

mpadge commented 1 year ago

And then just manipulate std::vector objects in all functions, without any Rcpp

AlbanSagouis commented 1 year ago

Rcpp::CharacterVector was silently converting user-provided numeric and integer values to character. Now the functions break when given numeric values.

mpadge commented 1 year ago

If it's only used as an entry point into C++ functions, then you could just pass paste0(x) through to C++?

AlbanSagouis commented 1 year ago

Yes I think it is.

I can see a user case for passing lat and lon numeric vectors to parse_hemisphere() but this is so much slower than 2 if() statements.