DataONEorg / rdataone

R package for reading and writing data at DataONE data repositories
http://doi.org/10.5063/F1M61H5X
36 stars 19 forks source link

`query` method gives cryptic error when a queryParam is numeric #181

Closed amoeba closed 7 years ago

amoeba commented 7 years ago
> query(mn, list(q = '*:*',
+                sort = 'dateUploaded+desc',
+                rows = 10))
 Show Traceback

 Rerun with Debug
 Error in strsplit(URL, "") : non-character argument 

I made a guess that the issue was that I set rows to 10 and not '10':

query(mn, list(q = '*:*',
               sort = 'dateUploaded+desc',
               rows = "10"))

Could a more helpful error be produced or could the method automatically try to convert to a character vector in this case?

gothub commented 7 years ago

Fixed in commit 2738e7b244c90a21312bcd80e97ad5d4647b37f8