Skip to content

Commit

Permalink
Avoid #27
Browse files Browse the repository at this point in the history
  • Loading branch information
kuriwaki committed Mar 2, 2021
1 parent 94ea27a commit 0dc86ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/dataset_versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dataset_versions <- function(dataset, key = Sys.getenv("DATAVERSE_KEY"), server
u <- paste0(api_url(server), "datasets/", dataset, "/versions")
r <- httr::GET(u, httr::add_headers("X-Dataverse-key" = key), ...)
httr::stop_for_status(r, task = httr::content(r)$message)
out <- httr::content(r, as = "text", encoding = "UTF-8")$data
out <- httr::content(r, encoding = "UTF-8")$data
lapply(out, function(x) {
x <- `class<-`(x, "dataverse_dataset_version")
x$files <- lapply(x$files, `class<-`, "dataverse_file")
Expand Down

0 comments on commit 0dc86ca

Please sign in to comment.