Skip to content
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 DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: soilDB
Type: Package
Title: Soil Database Interface
Version: 2.9.2
Version: 2.9.3
Authors@R: c(person(given="Dylan", family="Beaudette", role = c("aut"), email = "dylan.beaudette@usda.gov", comment=c(ORCID="0009-0008-2780-4785")),
person(given="Jay", family="Skovlin", role = c("aut")),
person(given="Stephen", family="Roecker", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# soilDB 2.9.3 (2026-09-05)
- `createSSURGO()` fix bug in logical column handling (introduced in 2.9.2) due to metadata column type enforcement (#483)
- Fix `structure()` usage of special argument names (.Label, .Names) in test fixtures for R-devel (#484)

# soilDB 2.9.2 (2026-07-10)
- EDIT base URL (for `get_EDIT_ecoclass_by_geoUnit()` and `make_EDIT_service_URL()`) updated to new USDA-managed server: <https://edit.sc.egov.usda.gov/>
- SoilWeb-based Web Coverage Services (`soilColor.wcs()`, `ISSR800.wcs()`, `mukey.wcs()`) have been updated with FY26 maps, now including most OCONUS soil surveys (AK, HI, PR, PW, GU, AS, MP)
Expand Down
43 changes: 18 additions & 25 deletions tests/testthat/test-simplifyFragmentData.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ context("Simplification of fragment data (from NASIS)")
## some complex data from NASIS phfrags table
d.single.hz <- structure(
list(
phiid = c(1202607L, 1202607L, 1202607L, 1202607L,
1202607L),
phiid = c(1202607L, 1202607L, 1202607L, 1202607L, 1202607L),
fragvol = c(5, 30, 10, 30, 5),
fragsize_l = c(2L,
76L, 76L, 2L, 251L),
fragsize_l = c(2L, 76L, 76L, 2L, 251L),
fragsize_r = c(
NA_integer_,
NA_integer_,
NA_integer_,
NA_integer_,
NA_integer_
),
fragsize_h = c(75L, 250L,
250L, 75L, 600L),
fragsize_h = c(75L, 250L, 250L, 75L, 600L),
fragshp = structure(
c(
NA_integer_,
Expand All @@ -28,13 +25,12 @@ d.single.hz <- structure(
NA_integer_,
NA_integer_
),
.Label = c("flat", "nonflat"),
levels = c("flat", "nonflat"),
class = "factor"
),
fraghard = structure(
c(10L, 2L, 10L, 2L,
2L),
.Label = c(
c(10L, 2L, 10L, 2L, 2L),
levels = c(
"noncemented",
"indurated",
"moderately cemented",
Expand All @@ -53,7 +49,7 @@ d.single.hz <- structure(
class = "factor"
)
),
.Names = c(
names = c(
"phiid",
"fragvol",
"fragsize_l",
Expand All @@ -66,14 +62,13 @@ d.single.hz <- structure(
class = "data.frame"
)


## data from NASIS phfrags with NA fragvol
d.missing.fragvol <- structure(
list(
phiid = c(1386592L, 1386592L, 1386592L, 1386592L,
1386592L, 1386592L),
phiid = c(1386592L, 1386592L, 1386592L, 1386592L, 1386592L, 1386592L),
fragvol = c(10, 10, 20, 20, 10, NA),
fragsize_l = c(2L,
2L, 75L, 75L, 380L, NA),
fragsize_l = c(2L, 2L, 75L, 75L, 380L, NA),
fragsize_r = c(
NA_integer_,
NA_integer_,
Expand All @@ -82,17 +77,15 @@ d.missing.fragvol <- structure(
NA_integer_,
NA_integer_
),
fragsize_h = c(75L,
75L, 380L, 380L, 600L, NA),
fragsize_h = c(75L, 75L, 380L, 380L, 600L, NA),
fragshp = structure(
c(1L, 1L, 1L,
1L, 1L, NA),
.Label = c("flat", "nonflat"),
c(1L, 1L, 1L, 1L, 1L, NA),
levels = c("flat", "nonflat"),
class = "factor"
),
fraghard = structure(
c(11L, 9L, 11L, 9L, 11L, NA),
.Label = c(
levels = c(
"noncemented",
"indurated",
"moderately cemented",
Expand All @@ -111,7 +104,7 @@ d.missing.fragvol <- structure(
class = "factor"
)
),
.Names = c(
names = c(
"phiid",
"fragvol",
"fragsize_l",
Expand Down Expand Up @@ -204,7 +197,7 @@ d.missing.size <-
NA_integer_,
NA_integer_
),
.Label = c("flat", "nonflat"),
levels = c("flat", "nonflat"),
class = "factor"
),
fraghard = structure(
Expand All @@ -222,7 +215,7 @@ d.missing.size <-
NA_integer_,
NA_integer_
),
.Label = c(
levels = c(
"noncemented",
"indurated",
"moderately cemented",
Expand All @@ -241,7 +234,7 @@ d.missing.size <-
class = "factor"
)
),
.Names = c(
names = c(
"phiid",
"fragvol",
"fragsize_l",
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-uncode.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test_that("uncode() works", {
test_that("uncode() works w/ NASISDomainsAsFactor(TRUE)", {
NASISDomainsAsFactor(TRUE)
x <- data.frame(texcl = 1:10)
expect_equivalent(uncode(x)$texcl, structure(1:10, .Label = c("cos", "s", "fs", "vfs", "lcos", "ls",
expect_equivalent(uncode(x)$texcl, structure(1:10, levels = c("cos", "s", "fs", "vfs", "lcos", "ls",
"lfs", "lvfs", "cosl", "sl", "fsl", "vfsl", "l", "sil", "si",
"scl", "cl", "sicl", "sc", "sic", "c"), class = "factor"))
NASISDomainsAsFactor(FALSE)
Expand All @@ -30,7 +30,7 @@ test_that("code() works w/ NASISDomainsAsFactor(TRUE)", {

test_that("NASISChoiceList() works", {
x <- NASISChoiceList(1:3, colnames = "texcl")
expect_equivalent(x, structure(c(3L, 12L, 5L), .Label = c("c", "cl", "cos", "cosl",
expect_equivalent(x, structure(c(3L, 12L, 5L), levels = c("c", "cl", "cos", "cosl",
"fs", "fsl", "l", "lcos", "lfs", "ls", "lvfs", "s", "sc", "scl",
"si", "sic", "sicl", "sil", "sl", "vfs", "vfsl"), class = "factor"))

Expand All @@ -43,7 +43,7 @@ test_that("NASISChoiceList() works", {

# ordered factor including obsolete choices
x <- NASISChoiceList("common", colnames = "flodfreqcl", choice = "ChoiceName", obsolete = TRUE)
expect_equivalent(x, structure(5L, .Label = c("none", "very rare", "rare", "occasional",
expect_equivalent(x, structure(5L, levels = c("none", "very rare", "rare", "occasional",
"common", "frequent", "very frequent"),
class = c("ordered", "factor")))

Expand Down