Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove raster, rgdal, sp packages from dependencies #187

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: brew install gdal proj
run: brew install gdal proj fribidi

- uses: r-lib/actions/setup-renv@v2
- uses: r-lib/actions/setup-r-dependencies@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ this repository.

- Fixed quarantine directions outputs in pops-multirun (@petrasovaa, #162).

### Removed

- Removed dependencies: packages rgdal, raster, sp

## [2.0.1] 2022-11-16

### Added
Expand Down
3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Imports:
MASS,
aws.s3,
Metrics,
raster,
methods
License: GPL-3 | file LICENSE
BugReports: https://github.com/ncsu-landscape-dynamics/rpops/issues
Expand All @@ -42,8 +41,6 @@ SystemRequirements:
GNU make
Suggests:
testthat,
rgdal,
sp,
rlist,
knitr,
rmarkdown,
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ importFrom(methods,is)
importFrom(parallel,detectCores)
importFrom(parallel,makeCluster)
importFrom(parallel,stopCluster)
importFrom(raster,calc)
importFrom(raster,cellStats)
importFrom(raster,extract)
importFrom(stats,cov)
importFrom(stats,median)
importFrom(stats,rnorm)
Expand Down
2 changes: 0 additions & 2 deletions R/configuration.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#'
#' @param config list of all data necessary used to set up c++ model
#'
#' @importFrom raster
#' cellStats calc extract
#' @importFrom terra app rast xres yres classify extract ext as.points ncol nrow
#' nlyr rowFromCell colFromCell values as.matrix rowFromCell colFromCell crs
#' rowColFromCell global vect
Expand Down
2 changes: 1 addition & 1 deletion R/pops_multirun.R
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add terra:: before which.min

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? It looks like it's running on a list of numbers or something like it, not a raster. There is no terra in front of the other two which.min.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore my comment

Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ pops_multirun <- function(infected_file,
west_distance_to_quarantine <- data.frame(t(rep(NA, length(probability_runs[[1]]))))
}

which_median <- function(x) raster::which.min(abs(x - median(x)))
which_median <- function(x) which.min(abs(x - median(x)))

median_run_index <- which_median(infected_number[[ncol(infected_number)]])
min_run_index <- which.min(infected_number[[ncol(infected_number)]])
Expand Down
84 changes: 3 additions & 81 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -569,26 +569,6 @@
],
"Hash": "7e5e3cbd2a7bc07880c94e22348fb661"
},
"igraph": {
"Package": "igraph",
"Version": "1.4.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"Matrix",
"R",
"cpp11",
"grDevices",
"graphics",
"magrittr",
"methods",
"pkgconfig",
"rlang",
"stats",
"utils"
],
"Hash": "f7f74f5fbff27d52b1283ac512bc5430"
},
"isoband": {
"Package": "isoband",
"Version": "0.2.7",
Expand Down Expand Up @@ -660,7 +640,7 @@
},
"landscapemetrics": {
"Package": "landscapemetrics",
"Version": "1.5.6",
"Version": "2.0.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -670,12 +650,11 @@
"cli",
"ggplot2",
"methods",
"raster",
"sp",
"stats",
"terra",
"tibble"
],
"Hash": "6c43fba1dd83b549ef471a36599898de"
"Hash": "101466a15b865990cd6e376df3f439de"
},
"lattice": {
"Package": "lattice",
Expand Down Expand Up @@ -1005,20 +984,6 @@
],
"Hash": "5e3c5dc0b071b21fa128676560dbe94d"
},
"raster": {
"Package": "raster",
"Version": "3.6-20",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"Rcpp",
"methods",
"sp",
"terra"
],
"Hash": "ebebd9f0f203a129eb2da96470191b82"
},
"rcmdcheck": {
"Package": "rcmdcheck",
"Version": "1.4.0",
Expand Down Expand Up @@ -1085,22 +1050,6 @@
],
"Hash": "ae34cd56890607370665bee5bd17812f"
},
"rgdal": {
"Package": "rgdal",
"Version": "1.6-7",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"grDevices",
"graphics",
"methods",
"sp",
"stats",
"utils"
],
"Hash": "10b777236c9e7855bc9dea8e347e30b7"
},
"rlang": {
"Package": "rlang",
"Version": "1.1.1",
Expand Down Expand Up @@ -1205,23 +1154,6 @@
],
"Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f"
},
"sp": {
"Package": "sp",
"Version": "1.6-1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"grDevices",
"graphics",
"grid",
"lattice",
"methods",
"stats",
"utils"
],
"Hash": "ca27b2643e3593b7688244d035f2cd92"
},
"stringi": {
"Package": "stringi",
"Version": "1.7.12",
Expand Down Expand Up @@ -1354,16 +1286,6 @@
],
"Hash": "8548b44f79a35ba1791308b61e6012d7"
},
"timechange": {
"Package": "timechange",
"Version": "0.2.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "8548b44f79a35ba1791308b61e6012d7",
"Requirements": [
"cpp11"
]
},
"tinytex": {
"Package": "tinytex",
"Version": "0.45",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
library(testthat)
library(raster)
library(PoPS)

testthat::test_check("PoPS")
Loading