IQSS / dataverse-client-r

R Client for Dataverse Repositories
https://iqss.github.io/dataverse-client-r
61 stars 25 forks source link

doi, "start" parameter using dataverse_search #19

Closed cscn closed 6 years ago

cscn commented 6 years ago

I'm attempting to use this client to find the doi of all .R files in a dataverse server, and I've run into a couple of interesting behaviors.

  1. Calling dataverse_search prints a message to the console "10 of 3842 results retrieved". However, calling dataverse_search with a "start" parameter that would seem to be the last page of the results (start = ceiling(3842/10) = 385) still yields 10 results, and pages beyond that number continue to yield results. Therefore, how would I determine the appropriate number of pages to get data for?
  2. dataverse_search does not return a doi field. The dataframe returned from dataverse_search has the following columns: ## [1] "name" "type" "url"
    ## [4] "file_id" "description" "published_at"
    ## [7] "file_type" "file_content_type" "size_in_bytes" ## [10] "md5" "checksum" "dataset_citation" ## [13] "unf" none of which are doi. I was able to get around this by parsing the "dataset_citation" column using stringr, but having a dedicated doi field would be wonderful.
pdurbin commented 6 years ago

Thanks for opening this issue, @cscn

You'd be welcome to poke around with the Search API directly if you want. It's documented at http://guides.dataverse.org/en/4.8.4/api/search.html

If you think there are bugs in the Search API or improvements to be made in the server-side code, please open issues at https://github.com/IQSS/dataverse/issues