diff --git a/.Rbuildignore b/.Rbuildignore index cc9a58e..80666be 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,4 @@ man-roxygen README.Rmd ^CONDUCT\.md$ +cran-comments\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index 7b7ee1e..81455e5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,20 +1,20 @@ Package: rdatacite Type: Package -Title: 'DataCite' Client for 'Oai-PMH' Methods and their Search 'API' +Title: 'DataCite' Client for 'OAI-PMH' Methods and their Search 'API' Description: Client for the web service methods provided - by 'DataCite' (http://datacite.org/), including functions to interface with + by 'DataCite' (), including functions to interface with their 'OAI-PMH' 'metadata' service, and a 'RESTful' search 'API'. The 'API' is backed by 'SOLR', allowing expressive queries, including faceting, statistics on variables, and 'more-like-this' queries. -Version: 0.0.9.9800 +Version: 0.1.0 License: MIT + file LICENSE Authors@R: c(person("Scott", "Chamberlain", role = c("aut", "cre"), email = "myrmecocystus@gmail.com")) URL: https://github.com/ropensci/rdatacite BugReports: https://github.com/ropensci/rdatacite/issues Imports: - oai, - solrium (>= 0.2.4) + oai (>= 0.2.0), + solrium (>= 0.3.0) Suggests: knitr, testthat diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..3ba267f --- /dev/null +++ b/NEWS.md @@ -0,0 +1,6 @@ +rdatacite 0.1.0 +=============== + +NEW FEATURES + +* Released to CRAN. diff --git a/R/dc_search.R b/R/dc_search.R index ac92812..bc87fdb 100644 --- a/R/dc_search.R +++ b/R/dc_search.R @@ -48,30 +48,30 @@ #' } dc_search <- function(..., verbose = TRUE, errors = "simple", proxy = NULL, callopts=list()) { check_conn(verbose, errors, proxy) - solr_search(..., callopts = callopts) + solrium::solr_search(..., callopts = callopts) } #' @export #' @rdname dc_search dc_facet <- function(..., verbose = TRUE, errors = "simple", proxy = NULL, callopts=list()) { check_conn(verbose, errors, proxy) - solr_facet(..., callopts = callopts) + solrium::solr_facet(..., callopts = callopts) } #' @export #' @rdname dc_search dc_stats <- function(..., verbose = TRUE, errors = "simple", proxy = NULL, callopts=list()) { check_conn(verbose, errors, proxy) - solr_stats(..., callopts = callopts) + solrium::solr_stats(..., callopts = callopts) } #' @export #' @rdname dc_search dc_mlt <- function(..., verbose = TRUE, errors = "simple", proxy = NULL, callopts=list()) { check_conn(verbose, errors, proxy) - solr_mlt(..., callopts = callopts) + solrium::solr_mlt(..., callopts = callopts) } check_conn <- function(verbose, errors, proxy) { - solr_connect(dc_base(), proxy = proxy, errors = errors, verbose = verbose) + solrium::solr_connect(dc_base(), proxy = proxy, errors = errors, verbose = verbose) } diff --git a/README.Rmd b/README.Rmd index b774eb1..cec5536 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,27 +21,13 @@ knitr::opts_chunk$set( ## Installation -Need `oai` `> v0.2` from CRAN - -```{r eval=FALSE} -install.packages("oai") -``` - -And install a newer version of `solrium` (`>= v0.2.4`), not yet on CRAN. - -```{r eval=FALSE} -devtools::install_github("ropensci/solrium") -``` - -Now install `rdatacite` - -from CRAN +Stable CRAN version ```{r eval=FALSE} install.packages("rdatacite") ``` -development version from github +Development version from github ```{r eval=FALSE} devtools::install_github("ropensci/rdatacite") diff --git a/README.md b/README.md index d0b918e..09e6d35 100644 --- a/README.md +++ b/README.md @@ -14,30 +14,14 @@ rdatacite ## Installation -Need `oai` `> v0.2` from CRAN - - -```r -install.packages("oai") -``` - -And install a newer version of `solrium` (`>= v0.2.4`), not yet on CRAN. - - -```r -devtools::install_github("ropensci/solrium") -``` - -Now install `rdatacite` - -from CRAN +Stable CRAN version ```r install.packages("rdatacite") ``` -development version from github +Development version from github ```r @@ -132,13 +116,13 @@ Search for the term _laser_ dc_search(q = "laser", fl = c('doi','publicationYear'), rows = 5) #> Source: local data frame [5 x 2] #> -#> doi publicationYear -#> (chr) (chr) -#> 1 10.5169/SEALS-52668 1982 -#> 2 10.2314/GBV:499941845 2004 -#> 3 10.2314/GBV:676509665 2011 -#> 4 10.2314/GBV:667365621 2010 -#> 5 10.2314/GBV:377452467 2002 +#> doi publicationYear +#> (chr) (chr) +#> 1 10.17035/D.2016.0008119129 2016 +#> 2 10.5169/SEALS-52668 1982 +#> 3 10.2314/GBV:676509665 2011 +#> 4 10.2314/GBV:667365621 2010 +#> 5 10.2314/GBV:574957529 2007 ``` Another search: published between 2000 and 2005 @@ -168,9 +152,9 @@ dc_facet(q = "wind", facet.field = 'publisher_facet', facet.limit = 5) #> $facet_fields #> $facet_fields$publisher_facet #> X1 X2 -#> 1 PANGAEA - Data Publisher for Earth & Environmental Science 30661 +#> 1 PANGAEA - Data Publisher for Earth & Environmental Science 30670 #> 2 Data-Planetâ„¢ Statistical Ready Reference by Conquest Systems, Inc. 1119 -#> 3 Unpublished 759 +#> 3 Unpublished 760 #> 4 Figshare 317 #> 5 Archaeology Data Service 263 #> @@ -193,7 +177,7 @@ dc_facet(q = "wind", facet.field = 'publisher_facet', facet.limit = 5) dc_stats(q = "ecology", stats.field = 'date') #> $data #> min max count missing -#> date 01-Jan-2007/29-Nov-2010 September 30, 2015 13321 3967 +#> date 01-Jan-2007/29-Nov-2010 September 30, 2015 13584 3989 #> #> $facet #> NULL diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..67f1f52 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,12 @@ +I have read and agree to the the CRAN policies at +http://cran.r-project.org/web/packages/policies.html + +R CMD CHECK passed on my local OS X install with R 3.2.3 and +R development version, Ubuntu running on Travis-CI, and WinBuilder. + +This is a new package. + +R CHECK will likely suggest spelling changes for 'OAI-PMH' to 'Oai-PMH', but +'OAI-PMH' is the correct form. + +Thanks! Scott Chamberlain