IQSS / dataverse-client-r

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

HTTP 404 error for doi pulled from Dataverse #12

Closed ulfelder closed 7 years ago

ulfelder commented 7 years ago

I'm getting a "Not Found (HTTP 404)" error when I try to pull metadata for a doi that was itself pulled from Dataverse using dataverse_search. Here's the sequence that leads to the error:

search <- dataverse_search("ICEWS")
md <- dataverse_metadata(search$url[4])

Is this an issue with the R package or Dataverse itself?

leeper commented 7 years ago

@ulfelder Thanks, I think the issue here is that you probably want get_dataset() or dataset_files() rather than dataverse_metadata(). In dataverse lingo a DOI points to a dataset, which can contain many related files, whereas a dataverse is a collection of datasets (and possibly other dataverses).

Thus dataverse_metadata("icews") would be used to retrieve information about the dataverse that this dataset is contained within. And that's probably not useful at any level.

I just pushed a couple of little fixes that might affect the behavior of these functions, so you may want to reinstall from GitHub.

Let me know if I can make this clearer in the documentation.