From ee57d28987102857956b477e4c91b3825df50387 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 15:17:44 -0600 Subject: [PATCH 01/20] starting cran check ref #57 --- .Rbuildignore | 1 + cran-comments.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index 87bee57..9eb942d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -19,3 +19,4 @@ man-roxygen/* ^_pkgdown\.yml$ ^docs$ ^pkgdown$ +^cran-comments\.md$ diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..2c00e19 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,34 @@ +Description +----------------------------------------------- + +This submission includes new features and updates to stay compliant with R checks. + +A second change is that I am now the package maintainer, taking over from Thomas J. Leeper (thosjleeper@gmail.com). + +Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley + + +Test environments +----------------------------------------------- + +1. Local Ubuntu, R 4.0.3 +1. Local Win8, R 4.0.3 Patched +1. r-hub + 1. [Ubuntu Linux 16.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-71151f2f04454bc18c16430e5d62610b) + 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-2f619028b765442f9dc1c34373443d2a) + 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-80133501925a411da4c3cf3be8205e29) +1. [win-builder](https://win-builder.r-project.org/xYyWrC1uFjXH), development version. +1. [Travis CI](https://travis-ci.org/github/IQSS/dataverse-client-r), Ubuntu 18.04 LTS + + +R CMD check results +----------------------------------------------- + +* No ERRORs or WARNINGs on any builds. + + +Downstream dependencies +----------------------------------------------- + +No downstream packages are affected. Only one package depends/imports REDCapR, and it passes my local checks. + * [codified](https://CRAN.R-project.org/package=codified) From 1ce6bd726f820e15111b2e3ec2cc387d7b55c1f3 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 15:18:10 -0600 Subject: [PATCH 02/20] updating links ref #57 --- README.Rmd | 2 +- README.md | 27 ++++++++++++++------------- docs/articles/C-retrieval.html | 2 +- docs/index.html | 12 ++++++------ docs/pkgdown.yml | 2 +- vignettes/C-retrieval.Rmd | 2 +- vignettes/C-retrieval.Rmd2 | 2 +- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/README.Rmd b/README.Rmd index b4864d4..42a2c63 100644 --- a/README.Rmd +++ b/README.Rmd @@ -11,7 +11,7 @@ Sys.setenv("DATAVERSE_SERVER" = "dataverse.harvard.edu") [![CRAN Version](https://www.r-pkg.org/badges/version/dataverse)](https://cran.r-project.org/package=dataverse) ![Downloads](https://cranlogs.r-pkg.org/badges/dataverse) [![Travis-CI Build Status](https://travis-ci.org/IQSS/dataverse-client-r.png?branch=master)](https://travis-ci.org/IQSS/dataverse-client-r) [![codecov.io](https://codecov.io/github/IQSS/dataverse-client-r/coverage.svg?branch=master)](https://codecov.io/github/IQSS/dataverse-client-r?branch=master) -[![Dataverse Project logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png "Dataverse Project")](https://dataverse.org) +[![Dataverse Project logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png)](https://dataverse.org) The **dataverse** package provides access to [Dataverse 4](https://dataverse.org/) APIs, enabling data search, retrieval, and deposit, thus allowing R users to integrate public data sharing into the reproducible research workflow. **dataverse** is the next-generation iteration of [the **dvn** package](https://cran.r-project.org/package=dvn), which works with Dataverse 3 ("Dataverse Network") applications. **dataverse** includes numerous improvements for data search, retrieval, and deposit, including use of the (currently in development) **sword** package for data deposit and the **UNF** package for data fingerprinting. diff --git a/README.md b/README.md index 724349a..2fb817a 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ Status](https://travis-ci.org/IQSS/dataverse-client-r.png?branch=master)](https: [![codecov.io](https://codecov.io/github/IQSS/dataverse-client-r/coverage.svg?branch=master)](https://codecov.io/github/IQSS/dataverse-client-r?branch=master) [![Dataverse Project -logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png -"Dataverse Project")](https://dataverse.org) +logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png)](https://dataverse.org) The **dataverse** package provides access to [Dataverse 4](https://dataverse.org/) APIs, enabling data search, @@ -53,12 +52,13 @@ Sys.setenv("DATAVERSE_KEY" = "examplekey12345") #### Server -Because [there are many Dataverse installations](https://dataverse.org/), -all functions in the R client require specifying what server -installation you are interacting with. This can be set by default with -an environment variable, `DATAVERSE_SERVER`. This should be the -Dataverse server, without the “https” prefix or the “/api” URL path, -etc. For example, the Harvard Dataverse can be used by setting: +Because [there are many Dataverse +installations](https://dataverse.org/), all functions in the R client +require specifying what server installation you are interacting with. +This can be set by default with an environment variable, +`DATAVERSE_SERVER`. This should be the Dataverse server, without the +“https” prefix or the “/api” URL path, etc. For example, the Harvard +Dataverse can be used by setting: ``` r Sys.setenv("DATAVERSE_SERVER" = "dataverse.harvard.edu") @@ -99,7 +99,7 @@ nlsw <- ## Downloading ingested version of data with readr::read_tsv. To download the original version and remove this message, set original = TRUE. - ## + ## ## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────── ## cols( ## idcode = col_double(), @@ -164,7 +164,8 @@ nlsw_original <- ) ``` -Note that even though the file prefix is “.tab”, we use `read_dta`. +Note that even though the file prefix is “.tab”, we use +`haven::read_dta`. Of course, when the dataset is not ingested (such as a Rds file), users would always need to specify an `.f` argument for the specific file. @@ -183,7 +184,7 @@ class(nlsw_tsv$race) # tab ingested version only has numeric data attr(nlsw_original$race, "labels") # original dta has value labels ``` - ## white black other + ## white black other ## 1 2 3 #### Reading a dataset as a binary file. @@ -220,7 +221,7 @@ get_dataset( ) ``` - ## Dataset (182162): + ## Dataset (182162): ## Version: 1.1, RELEASED ## Release Date: 2020-12-30T00:00:24Z ## License: CC0 @@ -323,6 +324,6 @@ Scott Chamberlain’s [oai](https://cran.r-project.org/package=oai), which offer metadata download from any web repository that is compliant with the [Open Archives Initiative](http://www.openarchives.org/) standards. Additionally, [rdryad](https://cran.r-project.org/package=rdryad) uses -OAIHarvester to interface with [Dryad](http://datadryad.org/). The +OAIHarvester to interface with [Dryad](https://datadryad.org/stash). The [rfigshare](https://cran.r-project.org/package=rfigshare) package works in a similar spirit to **dataverse** with . diff --git a/docs/articles/C-retrieval.html b/docs/articles/C-retrieval.html index b5258d7..4cbd6ef 100644 --- a/docs/articles/C-retrieval.html +++ b/docs/articles/C-retrieval.html @@ -102,7 +102,7 @@

2017-06-15

-

This vignette shows how to download data from Dataverse using the dataverse package. We’ll focus on a Dataverse repository that contains supplemental files for Jamie Monogan’s book Political Analysis Using R, which is stored at Harvard University’s IQSS Dataverse Network:

+

This vignette shows how to download data from Dataverse using the dataverse package. We’ll focus on a Dataverse repository that contains supplemental files for Political Analysis Using R, which is stored at Harvard University’s IQSS Dataverse Network:

Monogan, Jamie, 2015, “Political Analysis Using R: Example Code and Data, Plus Data for Practice Problems”, doi:10.7910/DVN/ARKOTI, Harvard Dataverse, V1, UNF:6:+itU9hcUJ8I9E0Kqv8HWHg==

diff --git a/docs/index.html b/docs/index.html index 2559d3b..0a02922 100644 --- a/docs/index.html +++ b/docs/index.html @@ -96,7 +96,7 @@ -

Dataverse Project logo

+

Dataverse Project logo

The dataverse package provides access to Dataverse 4 APIs, enabling data search, retrieval, and deposit, thus allowing R users to integrate public data sharing into the reproducible research workflow. dataverse is the next-generation iteration of the dvn package, which works with Dataverse 3 (“Dataverse Network”) applications. dataverse includes numerous improvements for data search, retrieval, and deposit, including use of the (currently in development) sword package for data deposit and the UNF package for data fingerprinting.

@@ -138,7 +138,7 @@

)

## Downloading ingested version of data with readr::read_tsv. To download the original version and remove this message, set original = TRUE.
 
-##
+## 
 ## ── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────
 ## cols(
 ##   idcode = col_double(),
@@ -180,7 +180,7 @@ 

original = TRUE, server = "demo.dataverse.org" )

-

Note that even though the file prefix is “.tab”, we use read_dta.

+

Note that even though the file prefix is “.tab”, we use haven::read_dta.

Of course, when the dataset is not ingested (such as a Rds file), users would always need to specify an .f argument for the specific file.

Note the difference between nls_tsv and nls_original. nls_original preserves the data attributes like value labels, whereas nls_tsv has dropped this or left this in file metadata.

@@ -188,7 +188,7 @@ 

## [1] "numeric"
 attr(nlsw_original$race, "labels") # original dta has value labels
-
## white black other
+
## white black other 
 ##     1     2     3
@@ -214,7 +214,7 @@

dataset = "10.70122/FK2/PPIAXE", server = "demo.dataverse.org" )

-
## Dataset (182162):
+
## Dataset (182162): 
 ## Version: 1.1, RELEASED
 ## Release Date: 2020-12-30T00:00:24Z
 ## License: CC0
@@ -287,7 +287,7 @@ 

Other Installations

-

Users interested in downloading metadata from archives other than Dataverse may be interested in Kurt Hornik’s OAIHarvester and Scott Chamberlain’s oai, which offer metadata download from any web repository that is compliant with the Open Archives Initiative standards. Additionally, rdryad uses OAIHarvester to interface with Dryad. The rfigshare package works in a similar spirit to dataverse with https://figshare.com/.

+

Users interested in downloading metadata from archives other than Dataverse may be interested in Kurt Hornik’s OAIHarvester and Scott Chamberlain’s oai, which offer metadata download from any web repository that is compliant with the Open Archives Initiative standards. Additionally, rdryad uses OAIHarvester to interface with Dryad. The rfigshare package works in a similar spirit to dataverse with https://figshare.com/.

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index e7f6cff..ebef248 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -6,7 +6,7 @@ articles: B-search: B-search.html C-retrieval: C-retrieval.html D-archiving: D-archiving.html -last_built: 2021-01-17T17:13Z +last_built: 2021-01-17T21:13Z urls: reference: https://IQSS.github.io/dataverse-client-r/reference article: https://IQSS.github.io/dataverse-client-r/articles diff --git a/vignettes/C-retrieval.Rmd b/vignettes/C-retrieval.Rmd index 2b24ded..8afa14c 100644 --- a/vignettes/C-retrieval.Rmd +++ b/vignettes/C-retrieval.Rmd @@ -17,7 +17,7 @@ vignette: > -This vignette shows how to download data from Dataverse using the dataverse package. We'll focus on a Dataverse repository that contains supplemental files for [Jamie Monogan](https://spia.uga.edu/faculty-member/jamie-monogan/)'s book [*Political Analysis Using R*](https://www.springer.com/gb/book/9783319234458), which is stored at Harvard University's [IQSS Dataverse Network](https://dataverse.harvard.edu/): +This vignette shows how to download data from Dataverse using the dataverse package. We'll focus on a Dataverse repository that contains supplemental files for [*Political Analysis Using R*](https://www.springer.com/gb/book/9783319234458), which is stored at Harvard University's [IQSS Dataverse Network](https://dataverse.harvard.edu/): > Monogan, Jamie, 2015, "Political Analysis Using R: Example Code and Data, Plus Data for Practice Problems", [doi:10.7910/DVN/ARKOTI](https://doi.org/10.7910/DVN/ARKOTI), Harvard Dataverse, V1, UNF:6:+itU9hcUJ8I9E0Kqv8HWHg== diff --git a/vignettes/C-retrieval.Rmd2 b/vignettes/C-retrieval.Rmd2 index a6c5230..493b2cd 100644 --- a/vignettes/C-retrieval.Rmd2 +++ b/vignettes/C-retrieval.Rmd2 @@ -20,7 +20,7 @@ options(width = 120) knitr::opts_chunk$set(results = "hold") ``` -This vignette shows how to download data from Dataverse using the dataverse package. We'll focus on a Dataverse repository that contains supplemental files for [Jamie Monogan](https://spia.uga.edu/faculty-member/jamie-monogan/)'s book [*Political Analysis Using R*](https://www.springer.com/gb/book/9783319234458), which is stored at Harvard University's [IQSS Dataverse Network](https://dataverse.harvard.edu/): +This vignette shows how to download data from Dataverse using the dataverse package. We'll focus on a Dataverse repository that contains supplemental files for [*Political Analysis Using R*](https://www.springer.com/gb/book/9783319234458), which is stored at Harvard University's [IQSS Dataverse Network](https://dataverse.harvard.edu/): > Monogan, Jamie, 2015, "Political Analysis Using R: Example Code and Data, Plus Data for Practice Problems", [doi:10.7910/DVN/ARKOTI](https://doi.org/10.7910/DVN/ARKOTI), Harvard Dataverse, V1, UNF:6:+itU9hcUJ8I9E0Kqv8HWHg== From b4d6647d48f07e71868ac1251999a7b35a9682a6 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 16:22:15 -0600 Subject: [PATCH 03/20] bump version ref #57 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 215b7e7..8e8d0c0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: dataverse -Version: 0.2.1.9002 +Version: 0.3.0 Title: Client for Dataverse 4 Repositories Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index a12718a..e91a181 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# CHANGES TO dataverse 0.2.2 (upcoming) +# CHANGES TO dataverse 0.3.0 * Make filter queries (fq) work in `dataverse_search` (#36 @adam3smith) * Update maintainer to Will Beasley (wibeasley@hotmail.com) (#38) From e227c7921c2144826cb3279a517d156dc5680fde Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 16:48:30 -0600 Subject: [PATCH 04/20] lazyData following advice of https://r-pkgs.org/data.html#data-data --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 8e8d0c0..894d82f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,6 +56,7 @@ Description: Provides access to Dataverse version 4 APIs . License: GPL-2 +LazyData: true URL: https://github.com/iqss/dataverse-client-r BugReports: https://github.com/iqss/dataverse-client-r/issues VignetteBuilder: knitr From 58505e1be98657d24ed40a96431bb850c229dadd Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 17:25:26 -0600 Subject: [PATCH 05/20] rmarkdown dependency for vignettes --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 894d82f..993750e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -49,6 +49,7 @@ Suggests: haven, knitr, purrr, + rmarkdown, testthat, UNF, yaml From 987c8842b9b7e0d0f3db217a7102fd7acd69091c Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 18:50:50 -0600 Subject: [PATCH 06/20] split comparisons into pieces to accelerate discovery of problem in rhub & winb-builder. ref #73 --- .../tests-get_dataframe-original-basketball.R | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/testthat/tests-get_dataframe-original-basketball.R b/tests/testthat/tests-get_dataframe-original-basketball.R index c26c900..e640849 100644 --- a/tests/testthat/tests-get_dataframe-original-basketball.R +++ b/tests/testthat/tests-get_dataframe-original-basketball.R @@ -1,6 +1,20 @@ # See https://demo.dataverse.org/dataverse/dataverse-client-r # https://doi.org/10.70122/FK2/HXJVJU +# standarize_string <- function (x) { +# substring(x, 1, 10) +# } +standarize_string <- function (x, start = 1, stop = nchar(x)) { + x %>% + base::iconv( + x = ., + from = "latin1", + to = "ASCII//TRANSLIT", + sub = "?" + ) %>% + substring(start, stop) +} + test_that("roster-by-name", { expected_ds <- retrieve_info_dataset("dataset-basketball/expected-metadata.yml") expected_file <- expected_ds$roster$raw_value @@ -16,7 +30,23 @@ test_that("roster-by-name", { expect_equal(substr(actual, 1, 30), substr(expected_file, 1, 30)) expect_equal(nchar( actual ), nchar( expected_file )) - expect_equal(actual, expected_file) + # actual <- standarize_string(actual) + # expected_file <- standarize_string(expected_file) + # expect_equal(actual, expected_file) + expect_equal(standarize_string(actual, 0001, 0100), standarize_string(expected_file, 0001, 0100)) + expect_equal(standarize_string(actual, 0101, 0200), standarize_string(expected_file, 0101, 0200)) + expect_equal(standarize_string(actual, 0201, 0300), standarize_string(expected_file, 0201, 0300)) + expect_equal(standarize_string(actual, 0301, 0400), standarize_string(expected_file, 0301, 0400)) + expect_equal(standarize_string(actual, 0401, 0500), standarize_string(expected_file, 0401, 0500)) + expect_equal(standarize_string(actual, 0501, 0600), standarize_string(expected_file, 0501, 0600)) + expect_equal(standarize_string(actual, 0601, 0700), standarize_string(expected_file, 0601, 0700)) + expect_equal(standarize_string(actual, 0701, 0800), standarize_string(expected_file, 0701, 0800)) + expect_equal(standarize_string(actual, 0801, 0900), standarize_string(expected_file, 0801, 0900)) + expect_equal(standarize_string(actual, 0901, 1000), standarize_string(expected_file, 0901, 1000)) + expect_equal(standarize_string(actual, 1001, 1085), standarize_string(expected_file, 1001, 1085)) + + + expect_equal(standarize_string(actual), standarize_string(expected_file)) }) test_that("roster-by-doi", { @@ -33,6 +63,9 @@ test_that("roster-by-doi", { expect_equal(substr(actual, 1, 30), substr(expected_file, 1, 30)) expect_equal(nchar( actual ), nchar( expected_file )) + actual <- standarize_string(actual) + expected_file <- standarize_string(expected_file) + expect_equal(actual, expected_file) }) @@ -50,6 +83,9 @@ test_that("roster-by-id", { expect_equal(substr(actual, 1, 30), substr(expected_file, 1, 30)) expect_equal(nchar( actual ), nchar( expected_file )) + actual <- standarize_string(actual) + expected_file <- standarize_string(expected_file) + expect_equal(actual, expected_file) }) From 86bc7a5fe569defc46f8a998ebc132e6ffe26ffd Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 17 Jan 2021 22:53:29 -0600 Subject: [PATCH 07/20] non-latin character for Kukoc ref #73 --- tests/testthat/tests-get_dataframe-original-basketball.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/tests-get_dataframe-original-basketball.R b/tests/testthat/tests-get_dataframe-original-basketball.R index e640849..8741c98 100644 --- a/tests/testthat/tests-get_dataframe-original-basketball.R +++ b/tests/testthat/tests-get_dataframe-original-basketball.R @@ -12,6 +12,7 @@ standarize_string <- function (x, start = 1, stop = nchar(x)) { to = "ASCII//TRANSLIT", sub = "?" ) %>% + sub("KukoA?,SF", "Kukoc,SF") %>% substring(start, stop) } From 86fa3c1747304c77e18f81908a28c37949c79b8a Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 00:08:00 -0600 Subject: [PATCH 08/20] fix vignette link ref #57 --- vignettes/A-introduction.Rmd | 2 +- vignettes/A-introduction.Rmd2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/A-introduction.Rmd b/vignettes/A-introduction.Rmd index 9b380cb..04aec50 100644 --- a/vignettes/A-introduction.Rmd +++ b/vignettes/A-introduction.Rmd @@ -57,7 +57,7 @@ You can search for and retrieve data without a Dataverse account for that a spec dataverse_search("ecological inference")[c("name", "type", "description")] ``` -The [search vignette](search.html) describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - `get_file()` - can retrieve the files as raw vectors: +The [search vignette](B-search.html) describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - `get_file()` - can retrieve the files as raw vectors: ```R get_dataset() diff --git a/vignettes/A-introduction.Rmd2 b/vignettes/A-introduction.Rmd2 index 22413ef..923adcc 100644 --- a/vignettes/A-introduction.Rmd2 +++ b/vignettes/A-introduction.Rmd2 @@ -56,7 +56,7 @@ You can search for and retrieve data without a Dataverse account for that a spec dataverse_search("ecological inference")[c("name", "type", "description")] ``` -The [search vignette](search.html) describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - `get_file()` - can retrieve the files as raw vectors: +The [search vignette](B-search.html) describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - `get_file()` - can retrieve the files as raw vectors: ```R get_dataset() From e4e9c8ee5a650fb5ef7524c76ec8083413d15f2a Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 00:08:52 -0600 Subject: [PATCH 09/20] bump version ref #57 --- docs/404.html | 2 +- docs/ISSUE_TEMPLATE.html | 2 +- docs/PULL_REQUEST_TEMPLATE.html | 2 +- docs/articles/A-introduction.html | 4 ++-- docs/articles/B-search.html | 2 +- docs/articles/C-retrieval.html | 2 +- docs/articles/D-archiving.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 6 +++--- docs/index.html | 2 +- docs/news/index.html | 2 +- docs/pkgdown.yml | 2 +- docs/reference/add_dataset_file.html | 2 +- docs/reference/add_file.html | 2 +- docs/reference/create_dataset.html | 2 +- docs/reference/create_dataverse.html | 2 +- docs/reference/dataset_atom.html | 2 +- docs/reference/dataset_versions.html | 2 +- docs/reference/dataverse.html | 2 +- docs/reference/dataverse_metadata.html | 2 +- docs/reference/dataverse_search.html | 2 +- docs/reference/delete_dataset.html | 2 +- docs/reference/delete_dataverse.html | 2 +- docs/reference/delete_file.html | 2 +- docs/reference/delete_sword_dataset.html | 2 +- docs/reference/files.html | 2 +- docs/reference/get_dataframe.html | 2 +- docs/reference/get_dataframe_internal.html | 2 +- docs/reference/get_dataset.html | 2 +- docs/reference/get_dataverse.html | 2 +- docs/reference/get_facets.html | 2 +- docs/reference/get_file_metadata.html | 2 +- docs/reference/get_user_key.html | 2 +- docs/reference/index.html | 2 +- docs/reference/initiate_sword_dataset.html | 2 +- docs/reference/is_ingested.html | 2 +- docs/reference/list_datasets.html | 2 +- docs/reference/publish_dataset.html | 2 +- docs/reference/publish_dataverse.html | 2 +- docs/reference/publish_sword_dataset.html | 2 +- docs/reference/service_document.html | 2 +- docs/reference/set_dataverse_metadata.html | 2 +- 42 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/404.html b/docs/404.html index c20f9e2..48ccbc9 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/ISSUE_TEMPLATE.html b/docs/ISSUE_TEMPLATE.html index c52c35a..9da4736 100644 --- a/docs/ISSUE_TEMPLATE.html +++ b/docs/ISSUE_TEMPLATE.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/PULL_REQUEST_TEMPLATE.html b/docs/PULL_REQUEST_TEMPLATE.html index 6de5746..97afc15 100644 --- a/docs/PULL_REQUEST_TEMPLATE.html +++ b/docs/PULL_REQUEST_TEMPLATE.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/articles/A-introduction.html b/docs/articles/A-introduction.html index 0bdf2f6..10f2d64 100644 --- a/docs/articles/A-introduction.html +++ b/docs/articles/A-introduction.html @@ -31,7 +31,7 @@ dataverse - 0.2.1.9002 + 0.3.0 @@ -130,7 +130,7 @@

You can search for and retrieve data without a Dataverse account for that a specific Dataverse installation. For example, to search for data files or datasets that mention “ecological inference”, we can just do:

 dataverse_search("ecological inference")[c("name", "type", "description")]
-

The search vignette describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - get_file() - can retrieve the files as raw vectors:

+

The search vignette describes this functionality in more detail. To retrieve a data file, we need to investigate the dataset being returned and look at what files it contains using a variety of functions, the last of which - get_file() - can retrieve the files as raw vectors:

 get_dataset()
 dataset_files()
diff --git a/docs/articles/B-search.html b/docs/articles/B-search.html
index dff2407..978a49b 100644
--- a/docs/articles/B-search.html
+++ b/docs/articles/B-search.html
@@ -31,7 +31,7 @@
       
       
         dataverse
-        0.2.1.9002
+        0.3.0
       
     
diff --git a/docs/articles/C-retrieval.html b/docs/articles/C-retrieval.html index 4cbd6ef..e2c5358 100644 --- a/docs/articles/C-retrieval.html +++ b/docs/articles/C-retrieval.html @@ -31,7 +31,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/articles/D-archiving.html b/docs/articles/D-archiving.html index 4316f7c..37bfc73 100644 --- a/docs/articles/D-archiving.html +++ b/docs/articles/D-archiving.html @@ -31,7 +31,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/articles/index.html b/docs/articles/index.html index 682428b..13d032e 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/authors.html b/docs/authors.html index 9ccabe4..26db6b5 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 @@ -135,11 +135,11 @@

Citation

Source: inst/CITATION -

Thomas J. Leeper (). dataverse: R Client for Dataverse 4. R package version 0.2.1.9002.

+

Thomas J. Leeper (). dataverse: R Client for Dataverse 4. R package version 0.3.0.

@Manual{,
   title = {dataverse: R Client for Dataverse 4},
   author = {Thomas J. Leeper},
-  note = {R package version 0.2.1.9002},
+  note = {R package version 0.3.0},
 }
diff --git a/docs/news/index.html b/docs/news/index.html index d9988b7..bfbe74e 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ebef248..b6193df 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -6,7 +6,7 @@ articles: B-search: B-search.html C-retrieval: C-retrieval.html D-archiving: D-archiving.html -last_built: 2021-01-17T21:13Z +last_built: 2021-01-18T05:26Z urls: reference: https://IQSS.github.io/dataverse-client-r/reference article: https://IQSS.github.io/dataverse-client-r/articles diff --git a/docs/reference/add_dataset_file.html b/docs/reference/add_dataset_file.html index 7400029..92c9607 100644 --- a/docs/reference/add_dataset_file.html +++ b/docs/reference/add_dataset_file.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/add_file.html b/docs/reference/add_file.html index cd64134..187c17d 100644 --- a/docs/reference/add_file.html +++ b/docs/reference/add_file.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/create_dataset.html b/docs/reference/create_dataset.html index 2ffe7e9..bddb923 100644 --- a/docs/reference/create_dataset.html +++ b/docs/reference/create_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/create_dataverse.html b/docs/reference/create_dataverse.html index 5d5b83e..19b3d97 100644 --- a/docs/reference/create_dataverse.html +++ b/docs/reference/create_dataverse.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/dataset_atom.html b/docs/reference/dataset_atom.html index 3936166..9d8b128 100644 --- a/docs/reference/dataset_atom.html +++ b/docs/reference/dataset_atom.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/dataset_versions.html b/docs/reference/dataset_versions.html index 67c54e1..9d497f7 100644 --- a/docs/reference/dataset_versions.html +++ b/docs/reference/dataset_versions.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/dataverse.html b/docs/reference/dataverse.html index 841223f..dafc0cd 100644 --- a/docs/reference/dataverse.html +++ b/docs/reference/dataverse.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/dataverse_metadata.html b/docs/reference/dataverse_metadata.html index 9d88281..e99ddf9 100644 --- a/docs/reference/dataverse_metadata.html +++ b/docs/reference/dataverse_metadata.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/dataverse_search.html b/docs/reference/dataverse_search.html index 943ee2a..62f6fc4 100644 --- a/docs/reference/dataverse_search.html +++ b/docs/reference/dataverse_search.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/delete_dataset.html b/docs/reference/delete_dataset.html index 5c726c7..6de0994 100644 --- a/docs/reference/delete_dataset.html +++ b/docs/reference/delete_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/delete_dataverse.html b/docs/reference/delete_dataverse.html index f8ebedf..6ef7158 100644 --- a/docs/reference/delete_dataverse.html +++ b/docs/reference/delete_dataverse.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/delete_file.html b/docs/reference/delete_file.html index 580e178..501260b 100644 --- a/docs/reference/delete_file.html +++ b/docs/reference/delete_file.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/delete_sword_dataset.html b/docs/reference/delete_sword_dataset.html index 4b81c64..df44fe8 100644 --- a/docs/reference/delete_sword_dataset.html +++ b/docs/reference/delete_sword_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/files.html b/docs/reference/files.html index add2fbe..fb70ed1 100644 --- a/docs/reference/files.html +++ b/docs/reference/files.html @@ -80,7 +80,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_dataframe.html b/docs/reference/get_dataframe.html index 2703a77..4eb4119 100644 --- a/docs/reference/get_dataframe.html +++ b/docs/reference/get_dataframe.html @@ -73,7 +73,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_dataframe_internal.html b/docs/reference/get_dataframe_internal.html index e449bdc..a44912d 100644 --- a/docs/reference/get_dataframe_internal.html +++ b/docs/reference/get_dataframe_internal.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_dataset.html b/docs/reference/get_dataset.html index 8907f9f..919a17f 100644 --- a/docs/reference/get_dataset.html +++ b/docs/reference/get_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_dataverse.html b/docs/reference/get_dataverse.html index 74a8ae7..ffa84a8 100644 --- a/docs/reference/get_dataverse.html +++ b/docs/reference/get_dataverse.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_facets.html b/docs/reference/get_facets.html index 694ae54..1368bba 100644 --- a/docs/reference/get_facets.html +++ b/docs/reference/get_facets.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_file_metadata.html b/docs/reference/get_file_metadata.html index 9eaf7d6..eea4df1 100644 --- a/docs/reference/get_file_metadata.html +++ b/docs/reference/get_file_metadata.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/get_user_key.html b/docs/reference/get_user_key.html index c665dca..6bc588a 100644 --- a/docs/reference/get_user_key.html +++ b/docs/reference/get_user_key.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/index.html b/docs/reference/index.html index af54628..fcaa10f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/initiate_sword_dataset.html b/docs/reference/initiate_sword_dataset.html index 77a6ea5..40ed417 100644 --- a/docs/reference/initiate_sword_dataset.html +++ b/docs/reference/initiate_sword_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/is_ingested.html b/docs/reference/is_ingested.html index 1ff70da..78874e9 100644 --- a/docs/reference/is_ingested.html +++ b/docs/reference/is_ingested.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/list_datasets.html b/docs/reference/list_datasets.html index 22424db..386f6db 100644 --- a/docs/reference/list_datasets.html +++ b/docs/reference/list_datasets.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/publish_dataset.html b/docs/reference/publish_dataset.html index aa139bc..378c020 100644 --- a/docs/reference/publish_dataset.html +++ b/docs/reference/publish_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/publish_dataverse.html b/docs/reference/publish_dataverse.html index 5d1bd92..e313f9d 100644 --- a/docs/reference/publish_dataverse.html +++ b/docs/reference/publish_dataverse.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/publish_sword_dataset.html b/docs/reference/publish_sword_dataset.html index 194f299..6031218 100644 --- a/docs/reference/publish_sword_dataset.html +++ b/docs/reference/publish_sword_dataset.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/service_document.html b/docs/reference/service_document.html index 695d136..877311b 100644 --- a/docs/reference/service_document.html +++ b/docs/reference/service_document.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 diff --git a/docs/reference/set_dataverse_metadata.html b/docs/reference/set_dataverse_metadata.html index 4f97254..2fccb38 100644 --- a/docs/reference/set_dataverse_metadata.html +++ b/docs/reference/set_dataverse_metadata.html @@ -72,7 +72,7 @@ dataverse - 0.2.1.9002 + 0.3.0 From 89b3b3ac54e09ad2d44c4267a7d136501e119fa4 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 01:44:52 -0600 Subject: [PATCH 10/20] small updates to docs --- docs/articles/A-introduction.html | 2 +- docs/articles/C-retrieval.html | 4 ++-- docs/articles/D-archiving.html | 2 +- docs/index.html | 2 +- docs/pkgdown.yml | 2 +- docs/reference/create_dataset.html | 2 +- for-developers/developer-tasks.R | 2 +- man/create_dataset.Rd | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/articles/A-introduction.html b/docs/articles/A-introduction.html index 10f2d64..0c8a287 100644 --- a/docs/articles/A-introduction.html +++ b/docs/articles/A-introduction.html @@ -121,7 +121,7 @@

2017-06-13

Quick Start

-

Dataverse has some terminology that is worth quickly reviewing before showing how to work with Dataverse in R. Dataverse is an application that can be installed in many places. As a result, dataverse can work with any instllation but you need to specify which installation you want to work with. This can be set by default with an environment variable, DATAVERSE_SERVER:

+

Dataverse has some terminology that is worth quickly reviewing before showing how to work with Dataverse in R. Dataverse is an application that can be installed in many places. As a result, dataverse can work with any installation but you need to specify which installation you want to work with. This can be set by default with an environment variable, DATAVERSE_SERVER:

 library("dataverse")
 Sys.setenv("DATAVERSE_SERVER" = "dataverse.harvard.edu")
diff --git a/docs/articles/C-retrieval.html b/docs/articles/C-retrieval.html index e2c5358..33fb551 100644 --- a/docs/articles/C-retrieval.html +++ b/docs/articles/C-retrieval.html @@ -294,14 +294,14 @@

Reusing Files and Reproducing Analysis

-

To reproduce the analysis, we can simply run the code file either as a system() call or directly in R using source() (note this particular file begins with an rm() call so you may want to run it in a new enviroment):

+

To reproduce the analysis, we can simply run the code file either as a system() call or directly in R using source() (note this particular file begins with an rm() call so you may want to run it in a new environment):

 # Option 1
 system("Rscript chapter03.R")
 
 # Option 2
 source("chapter03.R", local=new.env())
-

Any well-produced set of analysis reproduction files, like this one, should run without error once the data and code are in-hand. Troubleshooting anlaysis files is beyond the scope of this vignette, but common sources are

+

Any well-produced set of analysis reproduction files, like this one, should run without error once the data and code are in-hand. Troubleshooting analysis files is beyond the scope of this vignette, but common sources are

  1. The working directory is not set the same as the author intended. This could affect code files not finding the relative position of datasets or of other code files.
  2. Your local machine hasn’t downloaded or installed all the necessary datasets and packages.
  3. diff --git a/docs/articles/D-archiving.html b/docs/articles/D-archiving.html index 37bfc73..c43c1b3 100644 --- a/docs/articles/D-archiving.html +++ b/docs/articles/D-archiving.html @@ -109,7 +109,7 @@

    2017-06-15

    SWORD-based Data Archiving

    -

    The main data archiving (or “deposit”) workflow for Dataverse is built on SWORD v2.0. This means that to create a new dataset listing, you will have first initialize a dataset entry with some metadata, add one or more files to the dataset, and then publish it. This looks something like the following:

    +

    The main data archiving (or “deposit”) workflow for Dataverse is built on SWORD v2.0. This means that to create a new dataset listing, you will have to first initialize a dataset entry with some metadata, add one or more files to the dataset, and then publish it. This looks something like the following:

     # retrieve your service document
     d <- service_document()
    diff --git a/docs/index.html b/docs/index.html
    index f5c8cf8..0605e11 100644
    --- a/docs/index.html
    +++ b/docs/index.html
    @@ -241,7 +241,7 @@ 

    Data Archiving

    -

    Dataverse provides two - basically unrelated - workflows for managing (adding, documenting, and publishing) datasets. The first is built on SWORD v2.0. This means that to create a new dataset listing, you will have first initialize a dataset entry with some metadata, add one or more files to the dataset, and then publish it. This looks something like the following:

    +

    Dataverse provides two - basically unrelated - workflows for managing (adding, documenting, and publishing) datasets. The first is built on SWORD v2.0. This means that to create a new dataset listing, you will have to first initialize a dataset entry with some metadata, add one or more files to the dataset, and then publish it. This looks something like the following:

     # retrieve your service document
     d <- service_document()
    diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
    index b6193df..77b4e7a 100644
    --- a/docs/pkgdown.yml
    +++ b/docs/pkgdown.yml
    @@ -6,7 +6,7 @@ articles:
       B-search: B-search.html
       C-retrieval: C-retrieval.html
       D-archiving: D-archiving.html
    -last_built: 2021-01-18T05:26Z
    +last_built: 2021-01-18T07:41Z
     urls:
       reference: https://IQSS.github.io/dataverse-client-r/reference
       article: https://IQSS.github.io/dataverse-client-r/articles
    diff --git a/docs/reference/create_dataset.html b/docs/reference/create_dataset.html
    index bddb923..4e81278 100644
    --- a/docs/reference/create_dataset.html
    +++ b/docs/reference/create_dataset.html
    @@ -201,7 +201,7 @@ 

    Value

    An object of class “dataverse_dataset”.

    Details

    -

    create_dataset creates a Dataverse dataset. In Dataverse, a “dataset” is the lowest-level structure in which to organize files. For example, a Dataverse dataset might contain the files used to reproduce a published article, including data, analysis code, and related materials. Datasets can be organized into “Dataverse” objects, which can be further nested within other Dataverses. For someone creating an archive, this would be the first step to producing said archive (after creating a Dataverse, if one does not already exist). Once files and metadata have been added, the dataset can be publised (i.e., made public) using publish_dataset.

    +

    create_dataset creates a Dataverse dataset. In Dataverse, a “dataset” is the lowest-level structure in which to organize files. For example, a Dataverse dataset might contain the files used to reproduce a published article, including data, analysis code, and related materials. Datasets can be organized into “Dataverse” objects, which can be further nested within other Dataverses. For someone creating an archive, this would be the first step to producing said archive (after creating a Dataverse, if one does not already exist). Once files and metadata have been added, the dataset can be published (i.e., made public) using publish_dataset.

    update_dataset updates a Dataverse dataset that has already been created using create_dataset. This creates a draft version of the dataset or modifies the current draft if one is already in-progress. It does not assign a new version number to the dataset nor does it make it publicly visible (which can be done with publish_dataset).

    See also

    diff --git a/for-developers/developer-tasks.R b/for-developers/developer-tasks.R index 9b61d04..ade6b61 100644 --- a/for-developers/developer-tasks.R +++ b/for-developers/developer-tasks.R @@ -33,6 +33,6 @@ lintr::lint("R/add_dataset_file.R") # devtools::check(force_suggests = FALSE) devtools::check(cran=T) # devtools::check_rhub(email="wibeasley@hotmail.com") -# devtools::build_win(version="R-devel") #CRAN submission policies encourage the development version +# devtools::check_win_devel() #CRAN submission policies encourage the development version # devtools::revdep_check(pkg="REDCapR", recursive=TRUE) # devtools::release(check=FALSE) #Careful, the last question ultimately uploads it to CRAN, where you can't delete/reverse your decision. diff --git a/man/create_dataset.Rd b/man/create_dataset.Rd index 948af53..cb31ca3 100644 --- a/man/create_dataset.Rd +++ b/man/create_dataset.Rd @@ -51,7 +51,7 @@ An object of class \dQuote{dataverse_dataset}. Create or update dataset within a Dataverse } \details{ -\code{create_dataset} creates a Dataverse dataset. In Dataverse, a \dQuote{dataset} is the lowest-level structure in which to organize files. For example, a Dataverse dataset might contain the files used to reproduce a published article, including data, analysis code, and related materials. Datasets can be organized into \dQuote{Dataverse} objects, which can be further nested within other Dataverses. For someone creating an archive, this would be the first step to producing said archive (after creating a Dataverse, if one does not already exist). Once files and metadata have been added, the dataset can be publised (i.e., made public) using \code{\link{publish_dataset}}. +\code{create_dataset} creates a Dataverse dataset. In Dataverse, a \dQuote{dataset} is the lowest-level structure in which to organize files. For example, a Dataverse dataset might contain the files used to reproduce a published article, including data, analysis code, and related materials. Datasets can be organized into \dQuote{Dataverse} objects, which can be further nested within other Dataverses. For someone creating an archive, this would be the first step to producing said archive (after creating a Dataverse, if one does not already exist). Once files and metadata have been added, the dataset can be published (i.e., made public) using \code{\link{publish_dataset}}. \code{update_dataset} updates a Dataverse dataset that has already been created using \code{\link{create_dataset}}. This creates a draft version of the dataset or modifies the current draft if one is already in-progress. It does not assign a new version number to the dataset nor does it make it publicly visible (which can be done with \code{\link{publish_dataset}}). } From 696f28d58ebc928aa806c8448fffcf6294d8a8e4 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 01:56:18 -0600 Subject: [PATCH 11/20] update cran comments ref #57 --- cran-comments.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 2c00e19..121bdcd 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -12,11 +12,8 @@ Test environments ----------------------------------------------- 1. Local Ubuntu, R 4.0.3 -1. Local Win8, R 4.0.3 Patched -1. r-hub - 1. [Ubuntu Linux 16.04 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-71151f2f04454bc18c16430e5d62610b) - 1. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-2f619028b765442f9dc1c34373443d2a) - 1. [Windows Server](https://builder.r-hub.io/status/REDCapR_0.10.2.9006.tar.gz-80133501925a411da4c3cf3be8205e29) +1. Local Win10, R 4.0.3 Patched +1. [r-hub](https://builder.r-hub.io/status/dataverse_0.3.0.tar.gz-905624c45a92467eb688858acab1a13) 1. [win-builder](https://win-builder.r-project.org/xYyWrC1uFjXH), development version. 1. [Travis CI](https://travis-ci.org/github/IQSS/dataverse-client-r), Ubuntu 18.04 LTS @@ -25,10 +22,4 @@ R CMD check results ----------------------------------------------- * No ERRORs or WARNINGs on any builds. - - -Downstream dependencies ------------------------------------------------ - -No downstream packages are affected. Only one package depends/imports REDCapR, and it passes my local checks. - * [codified](https://CRAN.R-project.org/package=codified) +* One NOTE about the new package maintainer From 6f257b5f0891e143e57c09ab62fc7efef1ad1e47 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 02:08:07 -0600 Subject: [PATCH 12/20] update news file ref #57 --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index e91a181..3b692a8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ # CHANGES TO dataverse 0.3.0 +New Methods + +* Add new `get_dataframe_*()` methods (#48, #66) + +Small updates + * Make filter queries (fq) work in `dataverse_search` (#36 @adam3smith) * Update maintainer to Will Beasley (wibeasley@hotmail.com) (#38) * More robust file retrieval (#39 @kuriwaki) From 538fd153f10b1a3b7045197129295ebd9e3e3556 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 10:36:31 -0500 Subject: [PATCH 13/20] Fix typo --- R/get_dataframe.R | 2 +- man/get_dataframe.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/get_dataframe.R b/R/get_dataframe.R index 09c9101..a505abc 100644 --- a/R/get_dataframe.R +++ b/R/get_dataframe.R @@ -9,7 +9,7 @@ #' `"roster-bulls-1996.tab"`. #' @param .f The function to used for reading in the raw dataset. This user #' must choose the appropriate function: for example if the target is a .rds -#' file, then `.f` should be `readRDS` or `readr::read_`rds`. +#' file, then `.f` should be `readRDS` or `readr::read_rds`. #' @param original A logical, defaulting to TRUE. Whether to read the ingested, #' archival version of the dataset if one exists. The archival versions are tab-delimited #' `.tab` files so if `original = FALSE`, `.f` is set to `readr::read_tsv`. diff --git a/man/get_dataframe.Rd b/man/get_dataframe.Rd index 6f4f4c1..90a2a66 100644 --- a/man/get_dataframe.Rd +++ b/man/get_dataframe.Rd @@ -28,7 +28,7 @@ for example \code{"doi:10.70122/FK2/HXJVJU"}. Alternatively, an object of class \item{.f}{The function to used for reading in the raw dataset. This user must choose the appropriate function: for example if the target is a .rds -file, then \code{.f} should be \code{readRDS} or \code{readr::read_}rds`.} +file, then \code{.f} should be \code{readRDS} or \code{readr::read_rds}.} \item{original}{A logical, defaulting to TRUE. Whether to read the ingested, archival version of the dataset if one exists. The archival versions are tab-delimited From 50afad30e49bc103962d07045376f85958b59d84 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 10:42:04 -0500 Subject: [PATCH 14/20] Move around documentation for get_* --- R/get_dataframe.R | 10 ++++++---- R/get_file.R | 19 ++++++++++--------- man/files.Rd | 19 ++++++++++--------- man/get_dataframe.Rd | 10 ++++++---- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/R/get_dataframe.R b/R/get_dataframe.R index a505abc..ed16a66 100644 --- a/R/get_dataframe.R +++ b/R/get_dataframe.R @@ -1,7 +1,9 @@ -#' Get file from dataverse and convert it into a dataframe or tibble +#' Download dataverse file as a dataframe #' -#' `get_dataframe_by_id`, if you know the numeric ID of the dataset, or instead -#' `get_dataframe_by_name` if you know the filename and doi. The dataset +#' Use `get_dataframe_by_name` if you know the name of the datafile and the DOI +#' of the dataset. Use `get_dataframe_by_doi` if you know the DOI of the datafile +#' itself. Use `get_dataframe_by_id` if you know the numeric ID of the +#' datafile. #' #' @rdname get_dataframe #' @@ -11,7 +13,7 @@ #' must choose the appropriate function: for example if the target is a .rds #' file, then `.f` should be `readRDS` or `readr::read_rds`. #' @param original A logical, defaulting to TRUE. Whether to read the ingested, -#' archival version of the dataset if one exists. The archival versions are tab-delimited +#' archival version of the datafile if one exists. The archival versions are tab-delimited #' `.tab` files so if `original = FALSE`, `.f` is set to `readr::read_tsv`. #' If functions to read the original version is available, then `original = TRUE` #' with a specified `.f` is better. diff --git a/R/get_file.R b/R/get_file.R index 7964f42..9754af9 100644 --- a/R/get_file.R +++ b/R/get_file.R @@ -1,20 +1,21 @@ #' @rdname files #' -#' @title Download File +#' @title Download dataverse file as a raw binary #' -#' @description Download Dataverse File(s). `get_file` is a general wrapper, -#' and can take either dataverse objects, file IDs, or a filename and dataverse. +#' @description Download Dataverse File(s). `get_file_*` +#' functions return a raw binary file, which cannot be readily analyzed in R. +#' To use the objects as dataframes, see the `get_dataset_*` functions at +#' \link{get_dataset} instead. +#' +#' @details This function provides access to data files from a Dataverse entry. +#' `get_file` is a general wrapper, +#' and can take either dataverse objects, file IDs, or a filename and dataverse. +#' Internally, all functions download each file by `get_file_by_id`. #' `get_file_by_name` is a shorthand for running `get_file` by #' specifying a file name (`filename`) and dataset (`dataset`). #' `get_file_by_doi` obtains a file by its file DOI, bypassing the #' `dataset` argument. #' -#' Internally, all functions download each file by `get_file_by_id`. `get_file_*` -#' functions return a raw binary file, which cannot be readily analyzed in R. -#' To use the objects as dataframes, see the `get_dataset_*` functions at \link{get_dataset} -#' -#' @details This function provides access to data files from a Dataverse entry. -#' #' @param file An integer specifying a file identifier; or a vector of integers #' specifying file identifiers; or, if used with the prefix \code{"doi:"}, a #' character with the file-specific DOI; or, if used without the prefix, a diff --git a/man/files.Rd b/man/files.Rd index 7137ad5..6eb2c6a 100644 --- a/man/files.Rd +++ b/man/files.Rd @@ -5,7 +5,7 @@ \alias{get_file_by_name} \alias{get_file_by_id} \alias{get_file_by_doi} -\title{Download File} +\title{Download dataverse file as a raw binary} \usage{ get_file( file, @@ -107,19 +107,20 @@ function. To load datasets into the R environment dataframe, see \link{get_dataframe_by_name}. } \description{ -Download Dataverse File(s). \code{get_file} is a general wrapper, +Download Dataverse File(s). \verb{get_file_*} +functions return a raw binary file, which cannot be readily analyzed in R. +To use the objects as dataframes, see the \verb{get_dataset_*} functions at +\link{get_dataset} instead. +} +\details{ +This function provides access to data files from a Dataverse entry. +\code{get_file} is a general wrapper, and can take either dataverse objects, file IDs, or a filename and dataverse. +Internally, all functions download each file by \code{get_file_by_id}. \code{get_file_by_name} is a shorthand for running \code{get_file} by specifying a file name (\code{filename}) and dataset (\code{dataset}). \code{get_file_by_doi} obtains a file by its file DOI, bypassing the \code{dataset} argument. - -Internally, all functions download each file by \code{get_file_by_id}. \verb{get_file_*} -functions return a raw binary file, which cannot be readily analyzed in R. -To use the objects as dataframes, see the \verb{get_dataset_*} functions at \link{get_dataset} -} -\details{ -This function provides access to data files from a Dataverse entry. } \examples{ \dontrun{ diff --git a/man/get_dataframe.Rd b/man/get_dataframe.Rd index 90a2a66..d8a25fa 100644 --- a/man/get_dataframe.Rd +++ b/man/get_dataframe.Rd @@ -4,7 +4,7 @@ \alias{get_dataframe_by_name} \alias{get_dataframe_by_id} \alias{get_dataframe_by_doi} -\title{Get file from dataverse and convert it into a dataframe or tibble} +\title{Download dataverse file as a dataframe} \usage{ get_dataframe_by_name( filename, @@ -31,7 +31,7 @@ must choose the appropriate function: for example if the target is a .rds file, then \code{.f} should be \code{readRDS} or \code{readr::read_rds}.} \item{original}{A logical, defaulting to TRUE. Whether to read the ingested, -archival version of the dataset if one exists. The archival versions are tab-delimited +archival version of the datafile if one exists. The archival versions are tab-delimited \code{.tab} files so if \code{original = FALSE}, \code{.f} is set to \code{readr::read_tsv}. If functions to read the original version is available, then \code{original = TRUE} with a specified \code{.f} is better.} @@ -68,8 +68,10 @@ or globally using \code{Sys.setenv("DATAVERSE_SERVER" = "dataverse.example.com") \code{"10.70122/FK2/PPIAXE/MHDB0O"} or \code{"doi:10.70122/FK2/PPIAXE/MHDB0O"}} } \description{ -\code{get_dataframe_by_id}, if you know the numeric ID of the dataset, or instead -\code{get_dataframe_by_name} if you know the filename and doi. The dataset +Use \code{get_dataframe_by_name} if you know the name of the datafile and the DOI +of the dataset. Use \code{get_dataframe_by_doi} if you know the DOI of the datafile +itself. Use \code{get_dataframe_by_id} if you know the numeric ID of the +datafile. } \examples{ From cb798511f38c0c26e37f826b899b89f43bba9e55 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 11:18:58 -0500 Subject: [PATCH 15/20] Reorder. The first example is not about rds, so we shouldn't name it that (cc @wibeasley) --- R/get_dataframe.R | 30 ++++++++++++++++-------------- man/get_dataframe.Rd | 30 ++++++++++++++++-------------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/R/get_dataframe.R b/R/get_dataframe.R index ed16a66..abdaeb3 100644 --- a/R/get_dataframe.R +++ b/R/get_dataframe.R @@ -23,35 +23,27 @@ #' @examples #' #' # Retrieve data.frame from dataverse DOI and file name -#' df_from_rds_ingested <- +#' df_tab <- #' get_dataframe_by_name( #' filename = "roster-bulls-1996.tab", #' dataset = "doi:10.70122/FK2/HXJVJU", #' server = "demo.dataverse.org" #' ) #' -#' # Retrieve the same data.frame from dataverse + file DOI -#' df_from_rds_ingested_by_doi <- +#' # Retrieve the same file from file DOI +#' df_tab <- #' get_dataframe_by_doi( #' filedoi = "10.70122/FK2/HXJVJU/SA3Z2V", #' server = "demo.dataverse.org" #' ) #' -#' # Retrieve ingested file originally a Stata dta -#' df_from_stata_ingested <- -#' get_dataframe_by_name( -#' filename = "nlsw88.tab", -#' dataset = "doi:10.70122/FK2/PPIAXE", -#' server = "demo.dataverse.org" -#' ) -#' #' #' # To use the original file version, or for non-ingested data, #' # please specify `original = TRUE` and specify a function in .f. #' -#' # A data.frame is still returned, but the +#' # Rds files are not ingested so original = TRUE and .f is required. #' if (requireNamespace("readr", quietly = TRUE)) { -#' df_from_rds_original <- +#' df_rds_original <- #' get_dataframe_by_name( #' filename = "nlsw88_rds-export.rds", #' dataset = "doi:10.70122/FK2/PPIAXE", @@ -61,8 +53,9 @@ #' ) #' } #' +#' # Get Stata file as original #' if (requireNamespace("haven", quietly = TRUE)) { -#' df_from_stata_original <- +#' df_stata_original <- #' get_dataframe_by_name( #' filename = "nlsw88.tab", #' dataset = "doi:10.70122/FK2/PPIAXE", @@ -71,6 +64,15 @@ #' .f = haven::read_dta #' ) #' } +#' +#' # Stata file as ingested file (less information than original) +#' df_stata_ingested <- +#' get_dataframe_by_name( +#' filename = "nlsw88.tab", +#' dataset = "doi:10.70122/FK2/PPIAXE", +#' server = "demo.dataverse.org" +#' ) +#' #' @export get_dataframe_by_name <- function ( filename, diff --git a/man/get_dataframe.Rd b/man/get_dataframe.Rd index d8a25fa..ac514ff 100644 --- a/man/get_dataframe.Rd +++ b/man/get_dataframe.Rd @@ -76,35 +76,27 @@ datafile. \examples{ # Retrieve data.frame from dataverse DOI and file name -df_from_rds_ingested <- +df_tab <- get_dataframe_by_name( filename = "roster-bulls-1996.tab", dataset = "doi:10.70122/FK2/HXJVJU", server = "demo.dataverse.org" ) -# Retrieve the same data.frame from dataverse + file DOI -df_from_rds_ingested_by_doi <- +# Retrieve the same file from file DOI +df_tab <- get_dataframe_by_doi( filedoi = "10.70122/FK2/HXJVJU/SA3Z2V", server = "demo.dataverse.org" ) -# Retrieve ingested file originally a Stata dta -df_from_stata_ingested <- - get_dataframe_by_name( - filename = "nlsw88.tab", - dataset = "doi:10.70122/FK2/PPIAXE", - server = "demo.dataverse.org" - ) - # To use the original file version, or for non-ingested data, # please specify `original = TRUE` and specify a function in .f. -# A data.frame is still returned, but the +# Rds files are not ingested so original = TRUE and .f is required. if (requireNamespace("readr", quietly = TRUE)) { - df_from_rds_original <- + df_rds_original <- get_dataframe_by_name( filename = "nlsw88_rds-export.rds", dataset = "doi:10.70122/FK2/PPIAXE", @@ -114,8 +106,9 @@ if (requireNamespace("readr", quietly = TRUE)) { ) } +# Get Stata file as original if (requireNamespace("haven", quietly = TRUE)) { - df_from_stata_original <- + df_stata_original <- get_dataframe_by_name( filename = "nlsw88.tab", dataset = "doi:10.70122/FK2/PPIAXE", @@ -124,4 +117,13 @@ if (requireNamespace("haven", quietly = TRUE)) { .f = haven::read_dta ) } + +# Stata file as ingested file (less information than original) +df_stata_ingested <- + get_dataframe_by_name( + filename = "nlsw88.tab", + dataset = "doi:10.70122/FK2/PPIAXE", + server = "demo.dataverse.org" + ) + } From 342a494109c732ee783e78c66b6deb56d040d80e Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 11:20:07 -0500 Subject: [PATCH 16/20] readr is already in Imports (and we use readr::read_tsv all the time) so I don't think we need this --- R/get_dataframe.R | 18 ++++++++---------- man/get_dataframe.Rd | 18 ++++++++---------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/R/get_dataframe.R b/R/get_dataframe.R index abdaeb3..afc5542 100644 --- a/R/get_dataframe.R +++ b/R/get_dataframe.R @@ -42,16 +42,14 @@ #' # please specify `original = TRUE` and specify a function in .f. #' #' # Rds files are not ingested so original = TRUE and .f is required. -#' if (requireNamespace("readr", quietly = TRUE)) { -#' df_rds_original <- -#' get_dataframe_by_name( -#' filename = "nlsw88_rds-export.rds", -#' dataset = "doi:10.70122/FK2/PPIAXE", -#' server = "demo.dataverse.org", -#' original = TRUE, -#' .f = readr::read_rds -#' ) -#' } +#' df_rds_original <- +#' get_dataframe_by_name( +#' filename = "nlsw88_rds-export.rds", +#' dataset = "doi:10.70122/FK2/PPIAXE", +#' server = "demo.dataverse.org", +#' original = TRUE, +#' .f = readr::read_rds +#' ) #' #' # Get Stata file as original #' if (requireNamespace("haven", quietly = TRUE)) { diff --git a/man/get_dataframe.Rd b/man/get_dataframe.Rd index ac514ff..dfd8c94 100644 --- a/man/get_dataframe.Rd +++ b/man/get_dataframe.Rd @@ -95,16 +95,14 @@ df_tab <- # please specify `original = TRUE` and specify a function in .f. # Rds files are not ingested so original = TRUE and .f is required. -if (requireNamespace("readr", quietly = TRUE)) { - df_rds_original <- - get_dataframe_by_name( - filename = "nlsw88_rds-export.rds", - dataset = "doi:10.70122/FK2/PPIAXE", - server = "demo.dataverse.org", - original = TRUE, - .f = readr::read_rds - ) -} + df_rds_original <- + get_dataframe_by_name( + filename = "nlsw88_rds-export.rds", + dataset = "doi:10.70122/FK2/PPIAXE", + server = "demo.dataverse.org", + original = TRUE, + .f = readr::read_rds + ) # Get Stata file as original if (requireNamespace("haven", quietly = TRUE)) { From ef8f4544e7c7c6a84f242fcdf2d2ae3365a86766 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 11:22:25 -0500 Subject: [PATCH 17/20] Reorder authors roughly by amount of edits? (cc: @wibeasley) --- DESCRIPTION | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 993750e..e2c941e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,18 +14,18 @@ Authors@R: c( email = "thosjleeper@gmail.com", comment = c(ORCID = "0000-0003-4097-6326") ), - person( - "Philip", "Durbin", - role = c("aut"), - email = "philipdurbin@gmail.com", - comment = c(ORCID = "0000-0002-9528-9470") - ), person( "Shiro", "Kuriwaki", role = c("aut"), email = "shirokuriwaki@gmail.com", comment = c(ORCID = "0000-0002-5687-2647") ), + person( + "Philip", "Durbin", + role = c("aut"), + email = "philipdurbin@gmail.com", + comment = c(ORCID = "0000-0002-9528-9470") + ), person( "Sebastian", "Karcher", role=c("aut"), From c9025d7707bffd5d8dbfeaa0dd83291f4928fee8 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 11:28:20 -0500 Subject: [PATCH 18/20] As you know dvn is removed from CRAN (although that link still is live and leads to archival version). Also dvn should be for 3 and below --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e2c941e..076952e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -54,8 +54,8 @@ Suggests: UNF, yaml Description: Provides access to Dataverse version 4 APIs , - enabling data search, retrieval, and deposit. For Dataverse versions <= 4.0, - use the deprecated 'dvn' package . + enabling data search, retrieval, and deposit. For Dataverse versions <= 3.0, + use the archived 'dvn' package . License: GPL-2 LazyData: true URL: https://github.com/iqss/dataverse-client-r From 1c5d6e8901d2139d9bf0e9293a5c3dea0bc1fff8 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 18 Jan 2021 11:31:55 -0500 Subject: [PATCH 19/20] Dataverse moved to v5 in late 2020. All our new tests are tested against 5 so we can claim to cover that? (cc @wibeasley) --- DESCRIPTION | 2 +- README.Rmd | 6 +++--- README.md | 25 ++++++++++++------------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 076952e..34e9178 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -53,7 +53,7 @@ Suggests: testthat, UNF, yaml -Description: Provides access to Dataverse version 4 APIs , +Description: Provides access to Dataverse APIs (versions 4-5), enabling data search, retrieval, and deposit. For Dataverse versions <= 3.0, use the archived 'dvn' package . License: GPL-2 diff --git a/README.Rmd b/README.Rmd index 5585215..847ea41 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,5 +1,5 @@ --- -title: "R Client for Dataverse 4 Repositories" +title: "R Client for Dataverse Repositories" output: github_document --- @@ -13,7 +13,7 @@ Sys.setenv("DATAVERSE_SERVER" = "dataverse.harvard.edu") [![Dataverse Project logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png)](https://dataverse.org) -The **dataverse** package provides access to [Dataverse 4](https://dataverse.org/) APIs, enabling data search, retrieval, and deposit, thus allowing R users to integrate public data sharing into the reproducible research workflow. **dataverse** is the next-generation iteration of [the **dvn** package](https://cran.r-project.org/package=dvn), which works with Dataverse 3 ("Dataverse Network") applications. **dataverse** includes numerous improvements for data search, retrieval, and deposit, including use of the (currently in development) **sword** package for data deposit and the **UNF** package for data fingerprinting. +The **dataverse** package provides access to [Dataverse](https://dataverse.org/) APIs (versions 4-5), enabling data search, retrieval, and deposit, thus allowing R users to integrate public data sharing into the reproducible research workflow. **dataverse** is the next-generation iteration of [the **dvn** package](https://cran.r-project.org/package=dvn), which works with Dataverse 3 ("Dataverse Network") applications. **dataverse** includes numerous improvements for data search, retrieval, and deposit, including use of the (currently in development) **sword** package for data deposit and the **UNF** package for data fingerprinting. ### Getting Started @@ -32,7 +32,7 @@ library("dataverse") #### Keys -Some features of the Dataverse 4 API are public and require no authentication. This means in many cases you can search for and retrieve data without a Dataverse account for that a specific Dataverse installation. But, other features require a Dataverse account for the specific server installation of the Dataverse software, and an API key linked to that account. Instructions for obtaining an account and setting up an API key are available in the [Dataverse User Guide](https://guides.dataverse.org/en/latest/user/account.html). (Note: if your key is compromised, it can be regenerated to preserve security.) Once you have an API key, this should be stored as an environment variable called `DATAVERSE_KEY`. It can be set within R using: +Some features of the Dataverse API are public and require no authentication. This means in many cases you can search for and retrieve data without a Dataverse account for that a specific Dataverse installation. But, other features require a Dataverse account for the specific server installation of the Dataverse software, and an API key linked to that account. Instructions for obtaining an account and setting up an API key are available in the [Dataverse User Guide](https://guides.dataverse.org/en/latest/user/account.html). (Note: if your key is compromised, it can be regenerated to preserve security.) Once you have an API key, this should be stored as an environment variable called `DATAVERSE_KEY`. It can be set within R using: ``` r Sys.setenv("DATAVERSE_KEY" = "examplekey12345") diff --git a/README.md b/README.md index 2b75961..bef59be 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -R Client for Dataverse 4 Repositories +R Client for Dataverse Repositories ================ [![CRAN @@ -12,10 +12,10 @@ Status](https://travis-ci.org/IQSS/dataverse-client-r.png?branch=master)](https: logo](https://dataverse.org/files/dataverseorg/files/dataverse_project_logo-hp.png)](https://dataverse.org) The **dataverse** package provides access to -[Dataverse 4](https://dataverse.org/) APIs, enabling data search, -retrieval, and deposit, thus allowing R users to integrate public data -sharing into the reproducible research workflow. **dataverse** is the -next-generation iteration of [the **dvn** +[Dataverse](https://dataverse.org/) APIs (versions 4-5), enabling data +search, retrieval, and deposit, thus allowing R users to integrate +public data sharing into the reproducible research workflow. +**dataverse** is the next-generation iteration of [the **dvn** package](https://cran.r-project.org/package=dvn), which works with Dataverse 3 (“Dataverse Network”) applications. **dataverse** includes numerous improvements for data search, retrieval, and deposit, including @@ -34,7 +34,7 @@ library("dataverse") #### Keys -Some features of the Dataverse 4 API are public and require no +Some features of the Dataverse API are public and require no authentication. This means in many cases you can search for and retrieve data without a Dataverse account for that a specific Dataverse installation. But, other features require a Dataverse account for the @@ -257,13 +257,12 @@ subsequent pages, specify `start`. ### Data Archiving -Dataverse provides two - basically unrelated - workflows for managing -(adding, documenting, and publishing) datasets. The first is built on -[SWORD v2.0](http://swordapp.org/sword-v2/). This means that to create a -new dataset listing, you will have to first initialize a dataset entry with -some metadata, add one or more files to the dataset, and then publish -it. This looks something like the following: - +Dataverse provides two - basically unrelated - workflows for managing +(adding, documenting, and publishing) datasets. The first is built on +[SWORD v2.0](http://swordapp.org/sword-v2/). This means that to create a +new dataset listing, you will have to first initialize a dataset entry +with some metadata, add one or more files to the dataset, and then +publish it. This looks something like the following: ``` r # retrieve your service document From ce36291581568152e9ee526ab450d78bdf3bc7f6 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Mon, 18 Jan 2021 11:25:36 -0600 Subject: [PATCH 20/20] turn off some examples for CRAN submission ref #75 --- R/get_dataframe.R | 12 +++++++---- cran-comments.md | 4 +++- docs/pkgdown.yml | 2 +- docs/reference/get_dataframe.html | 36 +++++++++---------------------- man/get_dataframe.Rd | 12 +++++++---- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/R/get_dataframe.R b/R/get_dataframe.R index 09c9101..cacc3a5 100644 --- a/R/get_dataframe.R +++ b/R/get_dataframe.R @@ -19,7 +19,6 @@ #' @inheritDotParams get_file #' #' @examples -#' #' # Retrieve data.frame from dataverse DOI and file name #' df_from_rds_ingested <- #' get_dataframe_by_name( @@ -35,13 +34,16 @@ #' server = "demo.dataverse.org" #' ) #' +#' # Do not run when submitting to CRAN, because the whole +#' # example sometimes takes longer than 10 sec. +#' \dontrun{ #' # Retrieve ingested file originally a Stata dta #' df_from_stata_ingested <- #' get_dataframe_by_name( #' filename = "nlsw88.tab", #' dataset = "doi:10.70122/FK2/PPIAXE", #' server = "demo.dataverse.org" -#' ) +#' ) #' #' #' # To use the original file version, or for non-ingested data, @@ -56,7 +58,7 @@ #' server = "demo.dataverse.org", #' original = TRUE, #' .f = readr::read_rds -#' ) +#' ) #' } #' #' if (requireNamespace("haven", quietly = TRUE)) { @@ -67,8 +69,10 @@ #' server = "demo.dataverse.org", #' original = TRUE, #' .f = haven::read_dta -#' ) +#' ) #' } +#' } +#' #' @export get_dataframe_by_name <- function ( filename, diff --git a/cran-comments.md b/cran-comments.md index 121bdcd..b674f34 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -3,7 +3,9 @@ Description This submission includes new features and updates to stay compliant with R checks. -A second change is that I am now the package maintainer, taking over from Thomas J. Leeper (thosjleeper@gmail.com). +A second change is that I am now the package maintainer, taking over from Thomas J. Leeper (thosjleeper@gmail.com). See https://github.com/IQSS/dataverse-client-r/issues/42 and https://github.com/IQSS/dataverse-client-r/issues/21. + +The first submission on Jan 17/18 was rejected because the CRAN check had three notes that one documentation example exceeded 10 seconds. In response, I've added a `dontrun{}` block on most of that example. Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 77b4e7a..ca6d720 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -6,7 +6,7 @@ articles: B-search: B-search.html C-retrieval: C-retrieval.html D-archiving: D-archiving.html -last_built: 2021-01-18T07:41Z +last_built: 2021-01-18T17:11Z urls: reference: https://IQSS.github.io/dataverse-client-r/reference article: https://IQSS.github.io/dataverse-client-r/articles diff --git a/docs/reference/get_dataframe.html b/docs/reference/get_dataframe.html index 4eb4119..1260a63 100644 --- a/docs/reference/get_dataframe.html +++ b/docs/reference/get_dataframe.html @@ -223,8 +223,7 @@

    Arg

    Examples

    -
    -# Retrieve data.frame from dataverse DOI and file name +
    # Retrieve data.frame from dataverse DOI and file name df_from_rds_ingested <- get_dataframe_by_name( filename = "roster-bulls-1996.tab", @@ -263,34 +262,17 @@

    Examp #> experience_years = col_double(), #> college = col_character() #> )

    +# Do not run when submitting to CRAN, because the whole +# example sometimes takes longer than 10 sec. +if (FALSE) { # Retrieve ingested file originally a Stata dta df_from_stata_ingested <- get_dataframe_by_name( filename = "nlsw88.tab", dataset = "doi:10.70122/FK2/PPIAXE", server = "demo.dataverse.org" - ) -
    #> Downloading ingested version of data with readr::read_tsv. To download the original version and remove this message, set original = TRUE.
    #> -#> ── Column specification ──────────────────────────────────────────────────────── -#> cols( -#> idcode = col_double(), -#> age = col_double(), -#> race = col_double(), -#> married = col_double(), -#> never_married = col_double(), -#> grade = col_double(), -#> collgrad = col_double(), -#> south = col_double(), -#> smsa = col_double(), -#> c_city = col_double(), -#> industry = col_double(), -#> occupation = col_double(), -#> union = col_double(), -#> wage = col_double(), -#> hours = col_double(), -#> ttl_exp = col_double(), -#> tenure = col_double() -#> )
    + ) + # To use the original file version, or for non-ingested data, # please specify `original = TRUE` and specify a function in .f. @@ -304,7 +286,7 @@

    Examp server = "demo.dataverse.org", original = TRUE, .f = readr::read_rds - ) + ) } if (requireNamespace("haven", quietly = TRUE)) { @@ -315,8 +297,10 @@

    Examp server = "demo.dataverse.org", original = TRUE, .f = haven::read_dta - ) + ) } +} +