After having installed bomrang 0.6, and having run update_station_locations(), calling the get_current_weather() function with a lat/long, an error is returned:
get_current_weather(latlon=c(-35.22061 149.04354))
Error in station_meta$end - station_meta$start :
non-numeric argument to binary operator`
This seems to be a result of the JSONurl_site_list.rda file storing the record end dates as character, meaning the "count" subtraction operation in the get_current_weather() return statement fails.
Note that the only appears to be a problem after you've run update_station_locations(). The default JSONurl_site_list.rda file that comes with the package has more sensible types:
str(JSONurl_site_list)
...
$ start : num 1951 1956 1973 1997 1944 ...
$ end : int 2019 2019 2019 2019 2019 2019 2019 2019 2019 2019 ...
Session Info
```r
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4
```
After having installed bomrang 0.6, and having run update_station_locations(), calling the get_current_weather() function with a lat/long, an error is returned:
This seems to be a result of the JSONurl_site_list.rda file storing the record end dates as character, meaning the "count" subtraction operation in the get_current_weather() return statement fails.
Note that the only appears to be a problem after you've run update_station_locations(). The default JSONurl_site_list.rda file that comes with the package has more sensible types:
Session Info
```r R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.3 LTS Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.0 LAPACK: /usr/lib/lapack/liblapack.so.3.0 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 [6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.4 tools_3.4.4 ```