{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/rgbif/issues/226","repository_url":"https://api.github.com/repos/ropensci/rgbif","labels_url":"https://api.github.com/repos/ropensci/rgbif/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/rgbif/issues/226/comments","events_url":"https://api.github.com/repos/ropensci/rgbif/issues/226/events","html_url":"https://github.com/ropensci/rgbif/issues/226","id":174378292,"number":226,"title":"Can't add year and other parameter in occ_count","user":{"login":"scottsfarley93","id":10917266,"avatar_url":"https://avatars.githubusercontent.com/u/10917266?v=3","gravatar_id":"","url":"https://api.github.com/users/scottsfarley93","html_url":"https://github.com/scottsfarley93","followers_url":"https://api.github.com/users/scottsfarley93/followers","following_url":"https://api.github.com/users/scottsfarley93/following{/other_user}","gists_url":"https://api.github.com/users/scottsfarley93/gists{/gist_id}","starred_url":"https://api.github.com/users/scottsfarley93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottsfarley93/subscriptions","organizations_url":"https://api.github.com/users/scottsfarley93/orgs","repos_url":"https://api.github.com/users/scottsfarley93/repos","events_url":"https://api.github.com/users/scottsfarley93/events{/privacy}","received_events_url":"https://api.github.com/users/scottsfarley93/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ropensci/rgbif/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-31T21:03:37Z","updated_at":"2016-08-31T22:39:04Z","closed_at":null,"body":"When doing an occurrences count collection, you can combine multiple parameters, such as country code and basis of record, but you can't have years be one of those parameters.\r\n\r\n\r\nWorks:\r\n\r\n```occ_count(country='CA', georeferenced=TRUE, basisOfRecord='OBSERVATION')```\r\n\r\nDoesn't work:\r\n\r\n``` occ_count(country='CA', georeferenced=TRUE, basisOfRecord='OBSERVATION', year=2012)```\r\n\r\nGiving error:\r\n\r\n<pre>\r\nError: temp$headers$`content-type` == \"application/json\" is not TRUE\r\nIn addition: Warning message:\r\nThe provided address is not calculated in the cube: (country: (nobucket: 0027), basisOfRecord: (nobucket: 03), isGeoreferenced: (nobucket: 01), year: (nobucket: 000007dc)) \r\n</pre>\r\n\r\n<!-- If this issue relates to usage of the package, whether a question, bug or similar, along with your query, please paste your devtools::session_info() or sessionInfo() into the code block below. If not, delete all this and proceed :) -->\r\n\r\n```\r\nR version 3.3.1 (2016-06-21)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.10.5 (Yosemite)\r\n\r\nlocale:\r\n[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8\r\n\r\nattached base packages:\r\n[1] splines   parallel  stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n [1] paleobioDB_0.5.0     maps_3.1.1           reshape2_1.4.1       lubridate_1.5.6     \r\n [5] neotoma_1.6.1        rgbif_0.9.4          earthlife_0.0.0.9000 devtools_1.12.0     \r\n [9] gbm_2.1.1            survival_2.39-5      caret_6.0-71         lattice_0.20-33     \r\n[13] randomForest_4.6-12  SDMTools_1.1-221     dismo_1.1-1          raster_2.5-8        \r\n[17] sp_1.2-3             doMC_1.3.4           iterators_1.0.8      foreach_1.4.3       \r\n[21] plyr_1.8.4           ggplot2_2.1.0        lme4_1.1-12          Matrix_1.2-6        \r\n[25] coda_0.18-1          bayesm_3.0-2         RMySQL_0.10.9        DBI_0.4-1           \r\n\r\nloaded via a namespace (and not attached):\r\n [1] nlme_3.1-128       bitops_1.0-6       pbkrtest_0.4-6     oai_0.2.0          RColorBrewer_1.1-2\r\n [6] httr_1.2.1         tools_3.3.1        rgdal_1.1-10       R6_2.1.2           vegan_2.4-0       \r\n[11] rgeos_0.3-19       mgcv_1.8-13        colorspace_1.2-6   permute_0.9-0      nnet_7.3-12       \r\n[16] withr_1.0.2        analogue_0.17-0    curl_0.9.7         git2r_0.15.0       chron_2.3-47      \r\n[21] quantreg_5.26      SparseM_1.7        xml2_1.0.0         labeling_0.3       scales_0.4.0      \r\n[26] brglm_0.5-9        stringr_1.0.0      digest_0.6.9       foreign_0.8-66     minqa_1.2.4       \r\n[31] rworldmap_1.3-6    R.utils_2.3.0      rstudioapi_0.6     jsonlite_1.0       gtools_3.5.0      \r\n[36] dplyr_0.5.0        car_2.1-2          R.oo_1.20.0        RCurl_1.95-4.8     magrittr_1.5      \r\n[41] Rcpp_0.12.6        munsell_0.4.3      R.methodsS3_1.7.1  stringi_1.1.1      whisker_0.3-2     \r\n[46] MASS_7.3-45        grid_3.3.1         maptools_0.8-39    knitr_1.13         rjson_0.2.15      \r\n[51] codetools_0.2-14   stats4_3.3.1       V8_1.1             data.table_1.9.6   spam_1.3-0        \r\n[56] nloptr_1.0.4       MatrixModels_0.4-1 gtable_0.2.0       assertthat_0.1     princurve_1.1-12  \r\n[61] geoaxe_0.1.0       rsconnect_0.4.3    tibble_1.1         memoise_1.0.0      fields_8.4-1      \r\n[66] cluster_2.0.4    \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ropensci/rgbif/issues/comments/243924323","html_url":"https://github.com/ropensci/rgbif/issues/226#issuecomment-243924323","issue_url":"https://api.github.com/repos/ropensci/rgbif/issues/226","id":243924323,"user":{"login":"sckott","id":577668,"avatar_url":"https://avatars.githubusercontent.com/u/577668?v=3","gravatar_id":"","url":"https://api.github.com/users/sckott","html_url":"https://github.com/sckott","followers_url":"https://api.github.com/users/sckott/followers","following_url":"https://api.github.com/users/sckott/following{/other_user}","gists_url":"https://api.github.com/users/sckott/gists{/gist_id}","starred_url":"https://api.github.com/users/sckott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sckott/subscriptions","organizations_url":"https://api.github.com/users/sckott/orgs","repos_url":"https://api.github.com/users/sckott/repos","events_url":"https://api.github.com/users/sckott/events{/privacy}","received_events_url":"https://api.github.com/users/sckott/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T22:39:04Z","updated_at":"2016-08-31T22:39:04Z","body":"thanks @scottsfarley93 - the error message did come through from GBIF, but it's not really that helpful I admit. \r\n\r\nworking on improving the documentation for this function\r\n\r\nbasically, GBIF only allow a certain set of parameter combinations, so we can document that "}}
{"actor":{"display_login":"sckott"}}