diff --git a/.github/workflows/R-CMD-check-fedora.yaml b/.github/workflows/R-CMD-check-fedora.yaml index 6fb3110..7eef860 100644 --- a/.github/workflows/R-CMD-check-fedora.yaml +++ b/.github/workflows/R-CMD-check-fedora.yaml @@ -56,7 +56,6 @@ jobs: openssl-devel \ zlib-devel \ pandoc \ - pandoc-citeproc \ geos-devel \ make \ gdal \ diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index c998061..a0185ea 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -93,6 +93,7 @@ jobs: if: runner.os == 'Linux' && matrix.config.r == 'release' run: | result <- urlchecker::url_check() + result <- result[!startsWith(result$URL, "https://doi.org/"), , drop = FALSE] if (nrow(result) > 0) { print(result) stop("Invalid URLs detected") diff --git a/DESCRIPTION b/DESCRIPTION index 4b787ce..4c1ab2b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: surveyvoi Type: Package -Version: 1.0.5 +Version: 1.0.5.1 Title: Survey Value of Information Description: Decision support tool for prioritizing sites for ecological surveys based on their potential to improve plans for conserving @@ -15,7 +15,7 @@ Description: Decision support tool for prioritizing sites for ecological functions depend on the 'Gurobi' optimization software (available from ). Additionally, the 'JAGS' software (available from ) is required to fit hierarchical - generalized linear models. + generalized linear models. For further details, see Hanson et al. (2022) . Authors@R: c(person(c('Jeffrey', 'O'), 'Hanson', email='jeffrey.hanson@uqconnect.edu.au', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-4716-6134')), @@ -85,7 +85,7 @@ SystemRequirements: URL: https://prioritizr.github.io/surveyvoi/ BugReports: https://github.com/prioritizr/surveyvoi/issues VignetteBuilder: knitr -RoxygenNote: 7.2.1 +RoxygenNote: 7.2.3 Encoding: UTF-8 Biarch: true Collate: diff --git a/NEWS.md b/NEWS.md index 8edb99d..6be89d5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# surveyvoi 1.0.5.1 + +- Update citation. + # surveyvoi 1.0.5 - CRAN release. diff --git a/README.Rmd b/README.Rmd index fe89b75..9a74af5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -9,12 +9,12 @@ output: # surveyvoi: Survey Value of Information [![lifecycle](https://img.shields.io/badge/Lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![R-CMD-check-Ubuntu](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Ubuntu/master.svg?label=Ubuntu)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-Windows](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Windows/master.svg?label=Windows)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-macOS](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/macOS/master.svg?label=macOS)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-Fedora](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Fedora/master.svg?label=Fedora)](https://github.com/prioritizr/surveyvoi/actions) -[![Documentation](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Documentation/master.svg?label=Documentation)](https://github.com/prioritizr/surveyvoi/actions) -[![Coverage Status](https://codecov.io/github/prioritizr/surveyvoi/coverage.svg?branch=master)](https://codecov.io/github/prioritizr/surveyvoi?branch=master) +[![R-CMD-check-Ubuntu](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-ubuntu.yaml?branch=master&label=Ubuntu)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-Windows](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-windows.yaml?branch=master&label=Windows)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-macOS](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-macos.yaml?branch=master&label=macOS)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-fedora](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-fedora.yaml?branch=master&label=Fedora)](https://github.com/prioritizr/surveyvoi/actions) +[![Documentation](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/documentation.yaml?branch=master&label=Documentation)](https://github.com/prioritizr/surveyvoi/actions) +[![Coverage Status](https://img.shields.io/codecov/c/github/prioritizr/surveyvoi?label=Coverage)](https://app.codecov.io/gh/prioritizr/surveyvoi/branch/master) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/surveyvoi)](https://CRAN.R-project.org/package=surveyvoi) ```{r, include = FALSE} @@ -28,47 +28,6 @@ w = 3.0 ow = "400" ``` -```{r, include = FALSE} -# define helpers -is_rel_version <- function(x) { - length(strsplit(as.character(x), ".", fixed = TRUE)[[1]]) == 3 -} - -package_version_year <- function(x) { - if (x %in% rownames(available.packages())) { - return(live_package_version_year(x)) - } else { - return(archive_package_version_year(x)) - } -} - -live_package_version_year <- function(x) { - # fetch data - d <- versions::available.versions(x)[[1]] - d <- d[which(d$version == max(d$version)), , drop = FALSE] - c(as.character(d$version), as.character(format(as.POSIXct(d$date), "%Y"))) -} - -archive_package_version_year <- function(x) { - # fetch data (copied from remotes R package) - tf <- tempfile(fileext = ".gz") - on.exit(unlink(tf), add = TRUE) - download.file(tf, url = sprintf("%s/src/contrib/Meta/archive.rds", repo)) - con <- gzfile(tf, "rb") - on.exit(close(con), add = TRUE) - d <- readRDS(con)[[x]] - # extract version - rel_version <- basename(rownames(d)) - rel_version <- sapply(strsplit(rel_version, "_", fixed = TRUE), `[[`, 2) - rel_version <- sapply(strsplit(rel_version, ".tar", fixed = TRUE), `[[`, 1) - rel_version <- max(rel_version) - # extract year - rel_year <- as.character(max(format(d[, "mtime"], "%Y"))) - # return year version - c(rel_version, rel_year) -} -``` - The _surveyvoi_ package is a decision support tool for prioritizing sites for ecological surveys based on their potential to improve plans for conserving biodiversity (e.g. plans for establishing protected areas). Given a set of sites that could potentially be acquired for conservation management -- wherein some sites have previously been surveyed and other sites have not -- this package provides functionality to generate and evaluate plans for additional surveys. Specifically, plans for ecological surveys can be generated using various conventional approaches (e.g. maximizing expected species richness, geographic coverage, diversity of sampled environmental conditions) and by maximizing value of information. After generating plans for surveys, they can also be evaluated using value of information analysis. Please note that several functions depend on the Gurobi optimization software (available from https://www.gurobi.com). Additionally, the JAGS software (available from https://mcmc-jags.sourceforge.io/) is required to fit hierarchical generalized linear models. ## Installation @@ -118,29 +77,9 @@ brew install mpfr ## Citation -```{r, include = FALSE} -dev_version_year <- c( - as.character(packageDescription("surveyvoi")$Version), - format(Sys.time(), "%Y") -) -if (is_rel_version(dev_version_year[[1]])) { - rel_version_year <- dev_version_year -} else { - rel_version_year <- package_version_year("surveyvoi") -} -``` +Please cite the _surveyvoi R_ package when using it in publications. To cite the package, please use: -Please cite the _surveyvoi R_ package when using it in publications. To cite the latest official version, please use: - -```{r, echo = FALSE, results = "asis", comment = ""} -cat(paste0("> Hanson JO, Chadès I, Hudgins EJ, Bennett J (", rel_version_year[[2]], "). surveyvoi: Survey Value of Information. R package version ", rel_version_year[[1]], ". Available at https://CRAN.R-project.org/package=surveyvoi.\n")) -``` - -Alternatively, to cite the latest development version, please use: - -```{r, echo = FALSE, results = "asis", comment = ""} -cat(paste0("> Hanson JO, Chadès I, Hudgins EJ, Bennett J (", dev_version_year[[2]], "). surveyvoi: Survey Value of Information. R package version ", dev_version_year[[1]], ". Available at https://github.com/prioritizr/surveyvoi.\n")) -``` +> Hanson, JO, McCune JL, Chadès I, Proctor CA, Hudgins EJ, & Bennett JR (2023) Optimizing ecological surveys for conservation. Journal of Applied Ecology, 60: 41--51. Available at . ## Usage diff --git a/README.md b/README.md index e46e6aa..3aaf975 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ # surveyvoi: Survey Value of Information [![lifecycle](https://img.shields.io/badge/Lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![R-CMD-check-Ubuntu](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Ubuntu/master.svg?label=Ubuntu)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-Windows](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Windows/master.svg?label=Windows)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-macOS](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/macOS/master.svg?label=macOS)](https://github.com/prioritizr/surveyvoi/actions) -[![R-CMD-check-Fedora](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Fedora/master.svg?label=Fedora)](https://github.com/prioritizr/surveyvoi/actions) -[![Documentation](https://img.shields.io/github/workflow/status/prioritizr/surveyvoi/Documentation/master.svg?label=Documentation)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-Ubuntu](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-ubuntu.yaml?branch=master&label=Ubuntu)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-Windows](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-windows.yaml?branch=master&label=Windows)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-macOS](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-macos.yaml?branch=master&label=macOS)](https://github.com/prioritizr/surveyvoi/actions) +[![R-CMD-check-fedora](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/R-CMD-check-fedora.yaml?branch=master&label=Fedora)](https://github.com/prioritizr/surveyvoi/actions) +[![Documentation](https://img.shields.io/github/actions/workflow/status/prioritizr/surveyvoi/documentation.yaml?branch=master&label=Documentation)](https://github.com/prioritizr/surveyvoi/actions) [![Coverage -Status](https://codecov.io/github/prioritizr/surveyvoi/coverage.svg?branch=master)](https://codecov.io/github/prioritizr/surveyvoi?branch=master) +Status](https://img.shields.io/codecov/c/github/prioritizr/surveyvoi?label=Coverage)](https://app.codecov.io/gh/prioritizr/surveyvoi/branch/master) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/surveyvoi)](https://CRAN.R-project.org/package=surveyvoi) The *surveyvoi* package is a decision support tool for prioritizing @@ -94,17 +94,12 @@ following commands in the system terminal: ## Citation Please cite the *surveyvoi R* package when using it in publications. To -cite the latest official version, please use: +cite the package, please use: -> Hanson JO, Chadès I, Hudgins EJ, Bennett J (2022). surveyvoi: Survey -> Value of Information. R package version 1.0.5. Available at -> . - -Alternatively, to cite the latest development version, please use: - -> Hanson JO, Chadès I, Hudgins EJ, Bennett J (2022). surveyvoi: Survey -> Value of Information. R package version 1.0.5. Available at -> . +> Hanson, JO, McCune JL, Chadès I, Proctor CA, Hudgins EJ, & Bennett JR +> (2023) Optimizing ecological surveys for conservation. Journal of +> Applied Ecology, 60: 41–51. Available at +> . ## Usage @@ -189,7 +184,7 @@ ggtitle("management_cost") + theme(legend.title = element_blank()) ``` - + ``` r # plot cost of conducting an additional survey in each site @@ -200,7 +195,7 @@ ggtitle("survey_cost") + theme(legend.title = element_blank()) ``` - + ``` r # plot survey data @@ -352,7 +347,7 @@ ggtitle("scheme") + theme(legend.title = element_blank()) ``` - + This has just been a taster of the *surveyvoi R* package. In addition to this functionality, it can be used to evaluate survey schemes using diff --git a/cran-comments.md b/cran-comments.md index f8cedf7..411843a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -35,6 +35,14 @@ Jeff **The package uses the gurobi R package that is distributed with Gurobi software suite (and not available on CRAN). The DESCRIPTION, README, and package documentation provide instructions for installing the gurobi R package.** +* Found the following (possibly) invalid URLs: + URL: https://doi.org/10.1111/1365-2664.14309 + From: README.md + Status: 503 + Message: Service Unavailable + + **I have checked this URL and can confirm that it is valid.** + # System requirements The package has system requirements. Some of these requirements are mandatory -- and are required for successful installation -- and others are optional. To ensure that all mandatory requirements are available on CRAN systems, I have checked the software installed on CRAN's various systems. Briefly, this information was obtained from the [Windows toolchain](https://github.com/r-windows/rtools-packages); [macOS toolchain](https://github.com/R-macos/recipes) toolchains; [rcheckserver Debian meta-package](https://statmath.wu.ac.at/AASC/debian/dists/stable/main/binary-amd64/Packages); and via correspondence with CRAN volunteers. diff --git a/docs/404.html b/docs/404.html index dcb5357..8cb2494 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ surveyvoi - 1.0.5 + 1.0.5.1 @@ -91,7 +91,7 @@

Page not found (404)

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/index.html b/docs/articles/index.html index f7a35f9..260a8bf 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ surveyvoi - 1.0.5 + 1.0.5.1 @@ -65,7 +65,7 @@

All vignettes

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/surveyvoi.html b/docs/articles/surveyvoi.html index b961cb7..d8c19e2 100644 --- a/docs/articles/surveyvoi.html +++ b/docs/articles/surveyvoi.html @@ -33,7 +33,7 @@ surveyvoi - 1.0.5 + 1.0.5.1 @@ -72,7 +72,7 @@

surveyvoi: Survey Value of Information

Jeffrey O. Hanson

-

2022-09-13

+

2023-02-24

Source: vignettes/surveyvoi.Rmd @@ -687,7 +687,7 @@

References

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-13-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-13-1.png index 84354da..cab44ec 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-13-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-21-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-21-1.png index a184494..fd0c58e 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-21-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-21-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-27-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-27-1.png index 46787df..4dc472b 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-27-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-27-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-5-1.png index aefaa9b..32df4e1 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-6-1.png index 151d5ba..84bc7c3 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-7-1.png index 671c034..420cff2 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-8-1.png index 378bf10..a200996 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-9-1.png index 52d2016..c89c4d2 100644 Binary files a/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-9-1.png and b/docs/articles/surveyvoi_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/docs/authors.html b/docs/authors.html index f9cde14..97b06e7 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ surveyvoi - 1.0.5 + 1.0.5.1 @@ -71,21 +71,25 @@

Authors

Citation

- Source: DESCRIPTION + Source: inst/CITATION
-

Hanson JO, Chadès I, Hudgins EJ, Bennett JR (2022). -surveyvoi: Survey Value of Information. -R package version 1.0.5, https://prioritizr.github.io/surveyvoi/. +

Hanson JO, McCune JL, Chad'es I, Proctor CA, Hudgins EJ, Bennett JR (2022). +“wdpar: Interface to the World Database on Protected Areas.” +Journal of Applied Ecology, 60(1), 41–51. +doi:10.1111/1365-2664.14309.

-
@Manual{,
-  title = {surveyvoi: Survey Value of Information},
-  author = {Jeffrey O Hanson and Iadine Chadès and Emma J Hudgins and Joseph R Bennett},
+    
@Article{,
+  title = {wdpar: Interface to the World Database on Protected Areas},
+  author = {Jeffrey O Hanson and Jenny L McCune and Iadine Chad{`{e}}s and Caitlyn A Proctor and Emma J Hudgins and Joseph R Bennett},
   year = {2022},
-  note = {R package version 1.0.5},
-  url = {https://prioritizr.github.io/surveyvoi/},
+  journal = {Journal of Applied Ecology},
+  volume = {60},
+  number = {1},
+  pages = {41--51},
+  doi = {10.1111/1365-2664.14309},
 }
@@ -99,7 +103,7 @@

Citation

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/index.html b/docs/index.html index ef11b21..d3820e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -25,7 +25,7 @@ functions depend on the Gurobi optimization software (available from <https://www.gurobi.com>). Additionally, the JAGS software (available from <https://mcmc-jags.sourceforge.io/>) is required to fit hierarchical - generalized linear models."> + generalized linear models. For further details, see Hanson et al. (2022) <doi:10.1111/1365-2664.14309>.">