Adding in remaining maxent related functions and test scripts#13
Merged
hannahlowens merged 3 commits intohannahlowens:mainfrom Sep 26, 2025
Merged
Adding in remaining maxent related functions and test scripts#13hannahlowens merged 3 commits intohannahlowens:mainfrom
hannahlowens merged 3 commits intohannahlowens:mainfrom
Conversation
… threshold_3D, and their respective test scripts, as well as modified test scripts for cleanDepth and depthMatch to make them match the format of the other test scripts
hannahlowens
requested changes
Sep 25, 2025
Owner
hannahlowens
left a comment
There was a problem hiding this comment.
The code itself looks good, but please add predicts to Imports in the Description file (I prefer alphabetically, so the packages are easier to review when making changes). Also, check your unit tests for cleanDepth. I'm seeing:
── Warning ('test-cleanDepth.R:25:1'): (code run outside of test_that()) ─────
[readValues] raster has no values
Backtrace:
▆
- ├─base::sample(c(-4000:0), size = length(values(bath_data))) at test-cleanDepth.R:25:1
- │ └─base::sample.int(length(x), size, replace, prob)
- ├─terra::values(bath_data)
- └─terra::values(bath_data) at terra/R/Agenerics.R:388:50
- └─terra (local) .local(x, ...)
-
├─terra::readValues(...) at terra/R/values.R:94:9 -
└─terra::readValues(...) at terra/R/Agenerics.R:382:58 -
└─terra (local) .local(x, ...) -
└─terra:::messages(x, "readValues") at terra/R/values.R:59:9 -
└─terra:::warn(f, paste(unique(x@pntr$getWarnings()), collapse = "\n")) at terra/R/messages.R:19:25
…ackages in maxent_3D and threshold_3D to be alphabetical, and edited test-cleanDepth.R to remove warning message
Contributor
Author
|
Gotcha, I just pushed a new commit with those things fixed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
env_stack_transform is a function to convert a list of spatrasters where each list element is a variable and each layer is a depth into a list of spatrasters where each list element is a depth and each layer is a variable. partition_3D creates kfold and block partitions in 3D for training and validation, maxent_3D generates 3D ENMs using maxent, and threshold_3D creates thresholded 3D spatraster stacks.