Skip to content
New issue

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

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

Already on GitHub? # to your account

Development of v0.3.0 #16

Merged
merged 5 commits into from
May 3, 2024
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
^cran-comments\.md$
^NEWS\.md$
^tests/test_data/NED1
^tests/test_data/SOLUS100
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ vignettes/*.pdf
vignettes/*.html

# Local test data objects
tests/test_data/SOLUS100
tests/test_data/NED1
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rSW2exter
Title: Access External Data as Input for SOILWAT2 and STEPWAT2 Simulations
Version: 0.2.2
Version: 0.3.0
Authors@R: c(
person(
"Daniel", "Schlaepfer",
Expand All @@ -18,12 +18,12 @@ Imports:
rSW2st (>= 0.1.0),
rSW2data (>= 0.1.0),
terra,
raster,
reshape2,
sf
Suggests:
FedData (>= 3.0.2),
soilDB (>= 2.6.10),
raster,
utils,
testthat (>= 3.0.0),
spelling (>= 2.1.0),
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
export(calculate_soil_depth_NRCS)
export(check_Miller1998_CONUSSoil)
export(check_POLARIS)
export(check_SOLUS100)
export(create_conditioned_Miller1998_CONUSSoil)
export(depth_profile_SOLUS100)
export(download_SOLUS100)
export(extract_soils_Miller1998_CONUSSoil)
export(extract_soils_NRCS_SDA)
export(extract_soils_POLARIS)
export(extract_soils_SOLUS100)
export(extract_topography_NEDUSA)
export(fetch_mukeys_spatially_NRCS_SDA)
export(fetch_soils_from_Miller1998_CONUSSoil)
export(fetch_soils_from_NRCS_SDA)
export(fetch_soils_from_POLARIS)
export(fetch_soils_from_SOLUS100)
export(filenames_SOLUS100)
export(is_NRCS_horizon_organic)
export(prepare_script_for_Miller1998_CONUSSoil)
export(prepare_script_for_POLARIS)
export(variables_SOLUS100)
import(methods)
importFrom(stats,aggregate)
importFrom(stats,coef)
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# rSW2exter v0.3.0
* Functionality to download, query, and extract soils data from `SOLUS100`
* `depth_profile_SOLUS100()`, `variables_SOLUS100()`, and
`filenames_SOLUS100()` provide meta data.
* `download_SOLUS100()` and `check_SOLUS100()` download and manage
a local copy.
* `extract_soil_SOLUS100()` (and bare-bones `fetch_soils_from_SOLUS100()`)
extract soils data from a local copy.
* The `"raster"` package is now "suggested" (instead of "imported").


# rSW2exter v0.2.2
* `fetch_soils_from_NRCS_SDA()` gains the ability to inject queries with
multi-variable parameters. It gains two new arguments
Expand Down
6 changes: 5 additions & 1 deletion R/extract_soils_Miller1998_CONUSSoils.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ create_conditioned_Miller1998_CONUSSoil <- function(
)
) {

stopifnot(vars %in% names(lower_limits_by_vars))
stopifnot(
requireNamespace("raster"),
vars %in% names(lower_limits_by_vars)
)

res <- rep(FALSE, length(vars))
names(res) <- vars
Expand Down Expand Up @@ -247,6 +250,7 @@ check_Miller1998_CONUSSoil <- function(
fetch_soils_from_Miller1998_CONUSSoil <- function(
x, crs, vars, lower_limits_by_vars, path, verbose
) {
stopifnot(requireNamespace("raster"))

#--- Make sure inputs are correctly formatted
depths <- depth_profile_Miller1998_CONUSSoil()
Expand Down
Loading
Loading