IQSS / dataverse-client-r

R Client for Dataverse Repositories

Home Page:https://iqss.github.io/dataverse-client-r

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problema para recuperar informação pela API

anjosmarcos opened this issue · comments

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

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")
> packageVersion("dataverse")
[1] ‘0.3.11
> Sys.getenv("DATAVERSE_SERVER")
[1] ""

Abre a documentação.

?dataverse::get_dataframe_by_doi

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.