rywhale / kiwisR

Provides a simplified method for bringing tidy data into R from KISTERS WISKI databases via KiWIS API.
Other
12 stars 2 forks source link

Error with ki_station_list search term #1

Closed Nova-Scotia closed 6 years ago

Nova-Scotia commented 6 years ago

Hi Ryan,

I tried the following code and it worked just fine: my_stations <- ki_station_list(hub = 'swmc', search_term = "A*") but the modified code my_stations <- ki_station_list(hub = 'swmc', search_term = "Arm*") returned the error, Error in json_content[1, ] : incorrect number of dimensions.

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252 LC_NUMERIC=C                   
[5] LC_TIME=English_Canada.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] kiwisR_0.1.1

loaded via a namespace (and not attached):
 [1] httr_1.3.1       compiler_3.4.1   R6_2.2.2         tools_3.4.1      pillar_1.2.1     tibble_1.4.2     curl_3.2        
 [8] yaml_2.1.18      remotes_1.1.1    jsonlite_1.5     rlang_0.2.0.9001
rywhale commented 6 years ago

@Nova-Scotia Sorry for the late reply, looking into this right now.

rywhale commented 6 years ago

@Nova-Scotia Should be fixed now. It was due to the search term "Arm*" returning no results. Now if a search term returns no results, you will receive a message saying so.