diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 966c41c..643759e 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -118,7 +118,7 @@ jobs: - name: Check env: _R_CHECK_CRAN_INCOMING_: false - run: rcmdcheck::rcmdcheck(error_on = "error") + run: rcmdcheck::rcmdcheck(args = c("--no-manual","--as-cran"), error_on = "error") shell: Rscript {0} - name: Show testthat output diff --git a/NAMESPACE b/NAMESPACE index 0e65a2f..00ee887 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,25 +22,4 @@ export(spatiotemp_pseudoabs) export(spatiotemp_resolution) export(spatiotemp_thin) export(spatiotemp_weights) -importFrom(grDevices,dev.off) -importFrom(grDevices,png) -importFrom(grDevices,terrain.colors) -importFrom(graphics,abline) -importFrom(graphics,hist) -importFrom(graphics,plot) importFrom(magrittr,"%>%") -importFrom(methods,as) -importFrom(stats,aggregate) -importFrom(stats,as.formula) -importFrom(stats,chisq.test) -importFrom(stats,cor.test) -importFrom(stats,dist) -importFrom(stats,lm) -importFrom(stats,na.omit) -importFrom(stats,na.pass) -importFrom(stats,predict) -importFrom(stats,sd) -importFrom(stats,t.test) -importFrom(stats,var) -importFrom(utils,read.csv) -importFrom(utils,write.csv) diff --git a/R/data.R b/R/data.R index e0f628e..ebc9509 100644 --- a/R/data.R +++ b/R/data.R @@ -37,8 +37,8 @@ #' @docType data #' @references #' Friedl, M., Sulla-Menashe, D. (2019). MCD12Q1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global -#' 500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. Accessed 2022-11-24 from -#' +#' 500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. +#' #' #' Funk, Chris, Pete Peterson, Martin Landsfeld, Diego Pedreros, James Verdin, Shraddhanand Shukla, #' Gregory Husak, James Rowland, Laura Harrison, Andrew Hoell & Joel Michaelsen. "The climate @@ -147,7 +147,7 @@ #' @references #' Hengl T, Walsh MG, Sanderman J, Wheeler I, Harrison SP, Prentice IC. (2018) Global Mapping of #' Potential Natural Vegetation: An Assessment of Machine Learning Algorithms for Estimating Land -#' Potential. PeerJ Preprints. <10.7287/peerj.preprints.26811v1> +#' Potential. PeerJ Preprints. "sample_biome_data" #' @name sample_events_data @@ -202,12 +202,12 @@ #' @references #' Friedl, M., Sulla-Menashe, D. (2019). MCD12Q1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global #' 500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. Accessed 2022-11-24 from -#' +#' #' #' Funk, Chris, Pete Peterson, Martin Landsfeld, Diego Pedreros, James Verdin, Shraddhanand Shukla, #' Gregory Husak, James Rowland, Laura Harrison, Andrew Hoell & Joel Michaelsen. "The climate #' hazards infrared precipitation with stations-a new environmental record for monitoring extremes". -#' Scientific Data 2, 150066. doi:<10.1038/sdata.2015.66 2015>. +#' Scientific Data 2, 150066. "sample_cov_data" #' @name sample_proj_rast diff --git a/R/dynamicSDM-package.R b/R/dynamicSDM-package.R deleted file mode 100644 index 8bf3af9..0000000 --- a/R/dynamicSDM-package.R +++ /dev/null @@ -1,27 +0,0 @@ -#' @keywords internal -"_PACKAGE" - -## usethis namespace: start -#' @importFrom graphics abline -#' @importFrom graphics hist -#' @importFrom graphics plot -#' @importFrom grDevices dev.off -#' @importFrom grDevices png -#' @importFrom grDevices terrain.colors -#' @importFrom methods as -#' @importFrom stats aggregate -#' @importFrom stats as.formula -#' @importFrom stats chisq.test -#' @importFrom stats cor.test -#' @importFrom stats dist -#' @importFrom stats lm -#' @importFrom stats na.omit -#' @importFrom stats na.pass -#' @importFrom stats predict -#' @importFrom stats sd -#' @importFrom stats t.test -#' @importFrom stats var -#' @importFrom utils read.csv -#' @importFrom utils write.csv -## usethis namespace: end -NULL diff --git a/R/extract_buffered_coords.R b/R/extract_buffered_coords.R index f587b46..d3a5dd9 100644 --- a/R/extract_buffered_coords.R +++ b/R/extract_buffered_coords.R @@ -96,8 +96,7 @@ #' #' `extract_buffered_coords()` requires users to have installed R package `rgee` (Aybar et al., #' 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -#' instructions on the following website -#' . +#' instructions on the following website #' #' * `datasetname` must be in the accepted Google Earth Engine catalogue layout (e.g. #' “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/R/extract_buffered_raster.R b/R/extract_buffered_raster.R index 5b3b95c..3a7de7a 100644 --- a/R/extract_buffered_raster.R +++ b/R/extract_buffered_raster.R @@ -85,8 +85,7 @@ #' #' `extract_buffered_raster()` requires users to have installed R package `rgee` (Aybar et al., #' 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -#' instructions on the following website -#' . +#' instructions on the following website #' #' * `datasetname` must be in the accepted Google Earth Engine catalogue layout (e.g. #' “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/R/extract_dynamic_coords.R b/R/extract_dynamic_coords.R index 44b05fe..a955ee0 100644 --- a/R/extract_dynamic_coords.R +++ b/R/extract_dynamic_coords.R @@ -31,8 +31,7 @@ #' #' `extract_dynamic_coords()` requires users to have installed R package `rgee` (Aybar et al., #' 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -#' instructions on the following website -#' . +#' instructions on the following website . #' #' * `datasetname` must be in the accepted Google Earth Engine catalogue layout (e.g. #' `"MODIS/006/MCD12Q1"` "or `"UCSB-CHG/CHIRPS/DAILY"`) diff --git a/R/extract_dynamic_raster.R b/R/extract_dynamic_raster.R index c327712..1452a9e 100644 --- a/R/extract_dynamic_raster.R +++ b/R/extract_dynamic_raster.R @@ -34,8 +34,7 @@ #' #' `extract_dynamic_raster()` requires users to have installed R package `rgee` (Aybar et al., #' 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -#' instructions on the following website -#' . +#' instructions on the following website . #' #' * `datasetname` must be in the accepted Google Earth Engine catalogue layout (e.g. #' “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/R/spatiotemp_check.R b/R/spatiotemp_check.R index 53a9da8..4f2b44f 100644 --- a/R/spatiotemp_check.R +++ b/R/spatiotemp_check.R @@ -49,7 +49,7 @@ #'@references Zizka A, Silvestro D, Andermann T, Azevedo J, Duarte Ritter C, Edler D, Farooq H, #'Herdean A, Ariza M, Scharn R, Svanteson S, Wengstrom N, Zizka V, Antonelli A (2019). #'“CoordinateCleaner: standardized cleaning of occurrence records from biological collection -#'databases.” Methods in Ecology and Evolution, -7. , R package version +#'databases.” Methods in Ecology and Evolution, -7. \doi{10.1111/2041-210X.13152}, R package version #'2.0-20, . #'@return By default, returns occurrence record data frame, filtered to exclude records containing #' missing, duplicate or invalid data in record co-ordinates and dates. diff --git a/dynamicSDM.Rproj b/dynamicSDM.Rproj index 69fafd4..c6325b2 100644 --- a/dynamicSDM.Rproj +++ b/dynamicSDM.Rproj @@ -19,4 +19,5 @@ LineEndingConversion: Posix BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageCheckArgs: --as-cran PackageRoxygenize: rd,collate,namespace diff --git a/man/dynamicSDM-package.Rd b/man/dynamicSDM-package.Rd deleted file mode 100644 index bc415ba..0000000 --- a/man/dynamicSDM-package.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dynamicSDM-package.R -\docType{package} -\name{dynamicSDM-package} -\alias{dynamicSDM} -\alias{dynamicSDM-package} -\title{dynamicSDM: Species distribution and abundance modelling at high spatiotemporal resolution} -\description{ -Generate species distribution and abundance models that are dynamic through space and time. 'dynamicSDM' presents highly-flexible functions for incorporating both spatial and temporal aspects at key species distribution modelling stages, including when cleaning and filtering species occurrence data, assessing and correcting biases and autocorrelation, generating pseudo-absence records, extracting explanatory variables and projecting distribution. Functions take advantage of Google Earth Engine and Google Drive to minimise computing power and storage demands of high spatiotemporal resolution species distribution modelling. -} -\author{ -\strong{Maintainer}: Rachel Dobson \email{eerdord@gmail.com} (\href{https://orcid.org/0000-0003-3990-267X}{ORCID}) - -Authors: -\itemize{ - \item Andy J. Challinor \email{A.J.Challinor@leeds.ac.uk} (\href{https://orcid.org/0000-0002-8551-6617}{ORCID}) - \item Robert A. Cheke \email{R.A.Cheke@greenwich.ac.uk} (\href{https://orcid.org/0000-0002-7437-1934}{ORCID}) - \item Stewart Jennings \email{S.A.Jennings@leeds.ac.uk} (\href{https://orcid.org/0000-0002-1267-8623}{ORCID}) - \item Stephen G. Willis \email{s.g.willis@durham.ac.uk} (\href{https://orcid.org/0000-0002-8656-5808}{ORCID}) - \item Martin Dallimer \email{M.Dallimer@leeds.ac.uk} (\href{https://orcid.org/0000-0001-8120-3309}{ORCID}) -} - -} -\keyword{internal} diff --git a/man/extract_buffered_coords.Rd b/man/extract_buffered_coords.Rd index 3ea98b6..0fd8076 100644 --- a/man/extract_buffered_coords.Rd +++ b/man/extract_buffered_coords.Rd @@ -143,8 +143,7 @@ be \code{year} and for the latter, \code{temporal.level} should be \code{day}. \section{Google Earth Engine}{ \code{extract_buffered_coords()} requires users to have installed R package \code{rgee} (Aybar et al., 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -instructions on the following website -\url{https://cran.r-project.org/web/packages/rgee/vignettes/rgee01.html}. +instructions on the following website \url{https://cran.r-project.org/package=rgee} \itemize{ \item \code{datasetname} must be in the accepted Google Earth Engine catalogue layout (e.g. “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/man/extract_buffered_raster.Rd b/man/extract_buffered_raster.Rd index ddb9e44..d6f1903 100644 --- a/man/extract_buffered_raster.Rd +++ b/man/extract_buffered_raster.Rd @@ -130,8 +130,7 @@ For example, this function could return the sum of suitable land cover classifie \section{Google Earth Engine}{ \code{extract_buffered_raster()} requires users to have installed R package \code{rgee} (Aybar et al., 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -instructions on the following website -\url{https://cran.r-project.org/web/packages/rgee/vignettes/rgee01.html}. +instructions on the following website \url{https://cran.r-project.org/package=rgee} \itemize{ \item \code{datasetname} must be in the accepted Google Earth Engine catalogue layout (e.g. “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/man/extract_dynamic_coords.Rd b/man/extract_dynamic_coords.Rd index ee5294f..a67569b 100644 --- a/man/extract_dynamic_coords.Rd +++ b/man/extract_dynamic_coords.Rd @@ -65,8 +65,7 @@ calculates a mathematical function on such data. \section{Google Earth Engine}{ \code{extract_dynamic_coords()} requires users to have installed R package \code{rgee} (Aybar et al., 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -instructions on the following website -\url{https://cran.r-project.org/web/packages/rgee/vignettes/rgee01.html}. +instructions on the following website \url{https://cran.r-project.org/package=rgee}. \itemize{ \item \code{datasetname} must be in the accepted Google Earth Engine catalogue layout (e.g. \code{"MODIS/006/MCD12Q1"} "or \code{"UCSB-CHG/CHIRPS/DAILY"}) diff --git a/man/extract_dynamic_raster.Rd b/man/extract_dynamic_raster.Rd index 121c624..052f948 100644 --- a/man/extract_dynamic_raster.Rd +++ b/man/extract_dynamic_raster.Rd @@ -71,8 +71,7 @@ projection dynamic species distribution and abundance at high spatiotemporal res \section{Google Earth Engine}{ \code{extract_dynamic_raster()} requires users to have installed R package \code{rgee} (Aybar et al., 2020) and initialised Google Earth Engine with valid log-in credentials. Please follow -instructions on the following website -\url{https://cran.r-project.org/web/packages/rgee/vignettes/rgee01.html}. +instructions on the following website \url{https://cran.r-project.org/package=rgee}. \itemize{ \item \code{datasetname} must be in the accepted Google Earth Engine catalogue layout (e.g. “MODIS/006/MCD12Q1” or “UCSB-CHG/CHIRPS/DAILY”) diff --git a/man/sample_biome_data.Rd b/man/sample_biome_data.Rd index 4c67b48..ab911cd 100644 --- a/man/sample_biome_data.Rd +++ b/man/sample_biome_data.Rd @@ -27,6 +27,6 @@ Potential Distribution of Biomes (Hengl et al., 2018). \references{ Hengl T, Walsh MG, Sanderman J, Wheeler I, Harrison SP, Prentice IC. (2018) Global Mapping of Potential Natural Vegetation: An Assessment of Machine Learning Algorithms for Estimating Land -Potential. PeerJ Preprints. <10.7287/peerj.preprints.26811v1> +Potential. PeerJ Preprints. } \keyword{datasets} diff --git a/man/sample_cov_data.Rd b/man/sample_cov_data.Rd index 030bcfd..3d087a2 100644 --- a/man/sample_cov_data.Rd +++ b/man/sample_cov_data.Rd @@ -31,11 +31,10 @@ cropped to southern Africa at 2 degree resolution. \references{ Friedl, M., Sulla-Menashe, D. (2019). MCD12Q1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global 500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. Accessed 2022-11-24 from -\url{https://doi.org/10.5067/MODIS/MCD12Q1.006} Funk, Chris, Pete Peterson, Martin Landsfeld, Diego Pedreros, James Verdin, Shraddhanand Shukla, Gregory Husak, James Rowland, Laura Harrison, Andrew Hoell & Joel Michaelsen. "The climate hazards infrared precipitation with stations-a new environmental record for monitoring extremes". -Scientific Data 2, 150066. doi:<10.1038/sdata.2015.66 2015>. +Scientific Data 2, 150066. } \keyword{datasets} diff --git a/man/sample_explan_data.Rd b/man/sample_explan_data.Rd index d8c0c71..721ee22 100644 --- a/man/sample_explan_data.Rd +++ b/man/sample_explan_data.Rd @@ -46,8 +46,7 @@ are as follows: } \references{ Friedl, M., Sulla-Menashe, D. (2019). MCD12Q1 MODIS/Terra+Aqua Land Cover Type Yearly L3 Global -500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. Accessed 2022-11-24 from -\url{https://doi.org/10.5067/MODIS/MCD12Q1.006} +500m SIN Grid V006. NASA EOSDIS Land Processes DAAC. Funk, Chris, Pete Peterson, Martin Landsfeld, Diego Pedreros, James Verdin, Shraddhanand Shukla, Gregory Husak, James Rowland, Laura Harrison, Andrew Hoell & Joel Michaelsen. "The climate diff --git a/man/spatiotemp_check.Rd b/man/spatiotemp_check.Rd index 35f6a37..168e561 100644 --- a/man/spatiotemp_check.Rd +++ b/man/spatiotemp_check.Rd @@ -113,6 +113,6 @@ nrow(filtered_CC) Zizka A, Silvestro D, Andermann T, Azevedo J, Duarte Ritter C, Edler D, Farooq H, Herdean A, Ariza M, Scharn R, Svanteson S, Wengstrom N, Zizka V, Antonelli A (2019). “CoordinateCleaner: standardized cleaning of occurrence records from biological collection -databases.” Methods in Ecology and Evolution, -7. \url{doi:10.1111/2041-210X.13152}, R package version +databases.” Methods in Ecology and Evolution, -7. \doi{10.1111/2041-210X.13152}, R package version 2.0-20, \url{https://github.com/ropensci/CoordinateCleaner}. }