parzer
parzer copied to clipboard
erroring
not sure how to error. some methods
- if method gives back single output numeric/int/etc. then can error straight away
- when method gives back data.frame: error straight away when found? or throw warnings? or put error messages in an "error" column in the output, and fill with NAs?
not sure if this is the appropriate ticket to comment on, but it would be nice if parse_lat/parse_lon did not throw out a warning for detecting NA values in the vector. E.g.
> parzer::parse_lon(c(42.5, NA, 43.6, 56.3, -53, 0))
[1] 42.5 NaN 43.6 56.3 -53.0 0.0
Warning message:
In base::.Call(...) : no digits detected, got: NA
Seems to be a good place to me. Thanks! We are in the process of migrating from Rcpp to cpp11 so this might be something directly affected and if not, I agree there is room for improvement so I'll keep it in mind.