IQSS / dataverse-client-r

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

Problema para recuperar informação pela API #122

Closed anjosmarcos closed 1 year ago

anjosmarcos commented 1 year ago

Estou com problemas de recuperar dados pela API no Dataverse

Detalhes: https://stackoverflow.com/questions/73131628/n%c3%a3o-foi-poss%c3%advel-recuperar-um-conjunto-de-dados-no-dataverse

Erro apresentado:

could not find function "get_dataframe_by_doi"
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Send failure: Connection was aborted
kuriwaki commented 1 year ago

What do you get when you run the following?

packageVersion("dataverse")

and if you run

?dataverse::get_dataframe_by_doi

Do you get a help page?

Finally what do you get when you run

Sys.getenv("DATAVERSE_SERVER")
anjosmarcos commented 1 year ago
> packageVersion("dataverse")
[1] ‘0.3.11’
> Sys.getenv("DATAVERSE_SERVER")
[1] ""

Abre a documentação.

?dataverse::get_dataframe_by_doi
kuriwaki commented 1 year ago

It looks like you have the package and functions installed but you have not set a server. Every dataverse call needs to have specified which Dataverse (server) to look at. The main one is dataverse.harvard.edu, so you can set that for all your calls by editing your .Renviron or simply, each time, specify e.g.

dataverse::dataverse_search('Dados', server = "dataverse.harvard.edu")

This example works for me. There is more info on servers in the readme but let me know this still doesn't work.