Skip to content

Commit 855eed9

Browse files
committed
ver
1 parent 735fa42 commit 855eed9

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ccesMRPprep 0.1.14
22

33
* Update dataverse paths for cumulative and 2024
4+
* Add versions argument for get_cces_dataverse
45

56
# ccesMRPprep 0.1.13
67

R/get_dataverse.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#' (the default) will all rename them \code{"case_id"} and also add the year of the dataset.
1414
#' This way, every dataset that gets downloaded will have the unique identifier
1515
#' defined by the variables \code{c("year", "case_id")}.
16+
#' @param ver Version of the Dataverse dataset to extract. If not the default, setting
17+
#' "9" for example will extract V9 of the Dataverse. As of dataverse 0.3.15,
18+
#' datasets with the version specified will be cached.
1619
#' @param dataverse_paths A dataframe where one row represents metadata for one
1720
#' CCES dataset. Built-in data \link{cces_dv_ids} is used as a default and should
1821
#' not be changed.
@@ -67,6 +70,7 @@
6770
get_cces_dataverse <- function(name = "cumulative",
6871
year_subset = NULL,
6972
std_index = TRUE,
73+
ver = ":latest",
7074
dataverse_paths = ccesMRPprep::cces_dv_ids) {
7175

7276
y_info <- filter(dataverse_paths, .data$cces_name == as.character(name))
@@ -100,6 +104,7 @@ get_cces_dataverse <- function(name = "cumulative",
100104
dataset = glue("doi:{doi}"),
101105
server = svr,
102106
original = TRUE,
107+
version = ver,
103108
.f = fun)
104109

105110
# subset ---

man/get_cces_dataverse.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)