Skip to content

Commit

Permalink
elevatr moved to Suggests. Fixes #157
Browse files Browse the repository at this point in the history
  • Loading branch information
courtiol committed Sep 25, 2023
1 parent 4d4fef0 commit 49c70f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IsoriX/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Authors@R: c(
Depends:
R (>= 3.5.0)
Imports:
elevatr,
graphics,
grDevices,
grid,
Expand All @@ -35,6 +34,7 @@ Description: Building isoscapes using mixed models and inferring the geographic
plotting the maps produced with 'terra' using 'lattice'.
License: GPL (>= 2)
Suggests:
elevatr,
colorspace,
gmp,
magick,
Expand Down
5 changes: 5 additions & 0 deletions IsoriX/R/getelev.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ getelev <- function(file = "~/elevation_world_z5.tif",
...
) {

## Checking that elevatr is installed
if (!requireNamespace("elevatr", quietly = TRUE)) {
stop("You must install the package elevatr for this function to run: `install.packages('elevatr')`")
}

## Turning path into canonical form
## (this avoids the problem of using the wrong slashes and so on)
file <- normalizePath(file, mustWork = FALSE)
Expand Down
1 change: 1 addition & 0 deletions IsoriX/inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
\subsection{Geeky change}{
\itemize{
\item \code{OceanMask} and \code{CountryBorders} are no longer stored as RDA files in \code{/data}, but as RDS files in \code{/extata} since objects created with \pkg{terra} cannot be saved as RDA files. These files are automatically loaded when the package is attached.
\item \pkg{elevatr} moved from Imports to Suggests (#157)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can download and install the stable version of IsoriX directly from within R
install.packages("IsoriX", dependencies = TRUE)
```

Note: if you get into troubles due to `gmp`, `magick`, `rgl`, `testthat`, or `webshot2` retry using simply:
Note: if you get into troubles due to `elevatr`, `gmp`, `magick`, `rgl`, `testthat`, or `webshot2` retry using simply:

```R
install.packages("IsoriX")
Expand Down

0 comments on commit 49c70f2

Please sign in to comment.