Ironholds / WikidataR

An R package for the Wikidata API
Other
53 stars 14 forks source link

Config cannot be specified for get_item #8

Closed strepon closed 9 years ago

strepon commented 9 years ago

According to documentation, get_item should accept arguments for httr's GET function. However, e.g. setting of verbose output:

get_item(1, config = list(verbose = 1))

results in the error:

Error: Input to str_c should be atomic vectors

whilst the following works correctly:

GET("https://www.wikidata.org/wiki/Q1", config = list(verbose = 1))
Ironholds commented 9 years ago

huh; I get this. System/version/session info?

strepon commented 9 years ago

Ubuntu 14.10; both WikidataR and WikipediR installed today from GitHub.

R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=cs_CZ.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=cs_CZ.UTF-8        LC_COLLATE=cs_CZ.UTF-8    
 [5] LC_MONETARY=cs_CZ.UTF-8    LC_MESSAGES=cs_CZ.UTF-8   
 [7] LC_PAPER=cs_CZ.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] WikidataR_1.0.0

loaded via a namespace (and not attached):
[1] digest_0.6.4    httr_0.2        jsonlite_0.9.16 RCurl_1.95-4.1 
[5] stringr_0.6.2   tools_3.1.1     WikipediR_1.2.0
Ironholds commented 9 years ago

Your version of httr is ~4 releases out of date (the latest is 0.6.1); could it be something that's changed in that?

strepon commented 9 years ago

Yes, that's it! Thanks a lot and sorry for the noise.

Ironholds commented 9 years ago

No problem! I once submitted a bug answered with "you're missing a closing parentheses" :D