Skip to content

Commit

Permalink
Prepare for CRAN v0.1.13 release
Browse files Browse the repository at this point in the history
* In the `div_plot()` and `seq_plot()` internal functions, replaced `if (class(input) == "im")` with `if (methods::is(input, "im"))`
* Added `methods` package to Imports
* Re-added `utils` package to Suggests because "zzz.R" calls the `packageDescription()` function
* Moved `spatstat.random` package from Imports to Suggests because the `rpoispp()` function is only used for tests
  • Loading branch information
Ian Buller, PhD, MA committed Mar 24, 2022
1 parent 00e8d58 commit f78b519
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.1.12
Date: 2022-03-23 21:37:00 UTC
SHA: 00e8d585e836e9e9044f1b14adec291e13c34695
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: envi
Type: Package
Title: Environmental Interpolation using Spatial Kernel Density Estimation
Version: 0.1.12
Version: 0.1.13
Date: 2022-03-23
Authors@R:
c(person(given = "Ian D.",
Expand Down Expand Up @@ -43,20 +43,22 @@ Imports:
graphics,
grDevices,
iterators,
methods,
pls,
raster,
rgeos,
ROCR,
sp,
sparr,
spatstat.geom,
spatstat.random,
stats
Suggests:
R.rsp,
spatstat.data,
spatstat.random,
spelling,
testthat
testthat,
utils
VignetteBuilder: R.rsp
Language: en-US
URL: https://github.com/Waller-SUSAN/envi
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ importFrom(graphics,plot)
importFrom(graphics,plot.new)
importFrom(graphics,title)
importFrom(iterators,icount)
importFrom(methods,is)
importFrom(pls,cvsegments)
importFrom(raster,crs)
importFrom(raster,cut)
Expand Down Expand Up @@ -62,7 +63,6 @@ importFrom(spatstat.geom,ppp)
importFrom(spatstat.geom,rjitter)
importFrom(spatstat.geom,setmarks)
importFrom(spatstat.geom,superimpose)
importFrom(spatstat.random,rpoispp)
importFrom(stats,median)
importFrom(stats,na.omit)
importFrom(stats,sd)
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# envi (development version)

# envi v0.1.13
* In the `div_plot()` and `seq_plot()` internal functions, replaced `if (class(input) == "im")` with `if (methods::is(input, "im"))`
* Added `methods` package to Imports
* Re-added `utils` package to Suggests because "zzz.R" calls the `packageDescription()` function
* Moved `spatstat.random` package from Imports to Suggests because the `rpoispp()` function is only used for tests

# envi v0.1.12
* Fixed bug in `perlrren()` function that will now keep the predicted values even if NA
* Fixed bug in `plot_perturb()` function that will now project rasters using `method = "bilinear"` for continuous values
Expand Down
3 changes: 2 additions & 1 deletion R/div_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#' }
#'
#' @importFrom grDevices colorRampPalette
#' @importFrom methods is
#' @importFrom raster raster
#'
#' @keywords internal
Expand All @@ -32,7 +33,7 @@ div_plot <- function(input,
digits = 1) {

# Inputs
if (class(input) == "im") {
if (methods::is(input, "im")) {
out <- raster::raster(input)
} else { out <- input }

Expand Down
4 changes: 2 additions & 2 deletions R/lrren.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
#' # Presence data
#' presence <- spatstat.data::bei
#' spatstat.geom::marks(presence) <- data.frame("presence" = rep(1, presence$n),
#' "lon" = presence$x,
#' "lat" = presence$y)
#' "lon" = presence$x,
#' "lat" = presence$y)
#' spatstat.geom::marks(presence)$elev <- elev[presence]
#' spatstat.geom::marks(presence)$grad <- grad[presence]
#'
Expand Down
4 changes: 2 additions & 2 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ NULL
#' @importFrom graphics abline layout legend lines mtext par plot plot.new title
#' @importFrom grDevices chull colorRampPalette
#' @importFrom iterators icount
#' @importFrom methods is
#' @importFrom pls cvsegments
#' @importFrom raster crs cut extract image projectRaster raster rasterToPoints reclassify values
#' @importFrom rgeos gBuffer
#' @importFrom ROCR performance prediction
#' @importFrom sp bbox coordinates CRS gridded Polygon Polygons SpatialPolygons
#' @importFrom stats median na.omit sd
#' @importFrom spatstat.geom as.solist im.apply marks owin pixellate plot.ppp ppp rjitter setmarks superimpose
#' @importFrom spatstat.random rpoispp
#' @importFrom stats median na.omit sd
NULL
4 changes: 2 additions & 2 deletions R/perlrren.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
#' # Presence data
#' presence <- spatstat.data::bei
#' spatstat.geom::marks(presence) <- data.frame("presence" = rep(1, presence$n),
#' "lon" = presence$x,
#' "lat" = presence$y)
#' "lon" = presence$x,
#' "lat" = presence$y)
#'
#' # (Pseudo-)Absence data
#' absence <- spatstat.random::rpoispp(0.008, win = ims[[1]])
Expand Down
1 change: 0 additions & 1 deletion R/plot_perturb.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#' @importFrom raster crs raster projectRaster
#' @importFrom sp CRS
#' @importFrom spatstat.geom pixellate
#' @importFrom spatstat.random rpoispp
#'
#' @export
#'
Expand Down
3 changes: 2 additions & 1 deletion R/seq_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' }
#'
#' @importFrom grDevices colorRampPalette
#' @importFrom methods is
#'
#' @keywords internal
#'
Expand All @@ -27,7 +28,7 @@ seq_plot <- function(input,
digits = 1) {

# Inputs
if (class(input) == "im") {
if (methods::is(input, "im")) {
out <- raster::raster(input)
} else { out <- input }

Expand Down
18 changes: 12 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
## This is the twelfth resubmission
## This is the thirteenth resubmission

* Actions taken regarding feedback from CRAN teams' auto-check service:
* In the `div_plot()` and `seq_plot()` internal functions, replaced `if (class(input) == "im")` with `if (methods::is(input, "im"))`
* Added `methods` package to Imports

* Updates since previous submission:
* Fixed bug in `perlrren()` function that will now keep the predicted values even if NA
* Fixed bug in `plot_perturb()` function that will now project rasters using `method = "bilinear"` for continuous values
* Streamlined "test-perlrren.R" by removing duplicate tests for "incorrectly specified n_sim"
* Fixed bug in "test-plot_cv.R" by resetting the graphics within an error check to clear a warning between tests
* Re-added `utils` package to Suggests because "zzz.R" calls the `packageDescription()` function
* Moved `spatstat.random` package from Imports to Suggests because the `rpoispp()` function is only used for tests

* Documentation for `pval_correct()` references a doi <https://doi.org/10.2307/2283989> that throws a NOTE but is a valid URL
* Documentation for "man/envi-packge", man/pval_correct.Rd", and DESCRIPTION references the following DOIs, which throws a NOTE but are valid URLs:
* <https://doi.org/10.1002/sim.4780090616>
* <https://doi.org/10.1002/sim.4780101112>
* <https://doi.org/10.1002/sim.7577>
* <https://doi.org/10.1111/j.2517-6161.1995.tb02031.x>

## Test environments
* local OS X install, R 4.1.2
Expand Down
4 changes: 2 additions & 2 deletions man/lrren.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/perlrren.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f78b519

Please # to comment.