View source: R/extract_soils_NRCS_SDA.R
is_NRCS_horizon_organic | R Documentation |
Based on function CheckTexture()
, version 2020-08-31, of the
SoilDataDevelopmentToolbox.
is_NRCS_horizon_organic(x)
x |
A two-dimensional character object. Required columns are taxorder, taxsubgrp, desgnmaster, texture, and lieutex. Each horizon is represented by exactly one row. |
A logical vector representing each horizon. TRUE
indicates
that a horizon is considered organic; default is FALSE
representing mineral soils. NA
s in the input propagate.
Code based on CheckTexture() version 2020-Aug-31 from https://github.com/ncss-tech/SoilDataDevelopmentToolbox/blob/master/SDA_Valu2Table.py
x <- data.frame(
taxorder = c("Histosols", "x", "x", "x", "x", "x", NA),
taxsubgrp = c("x", "histic", "x", "x", "x", "x", NA),
desgnmaster = c("L", "L", "O", "x", "x", "x", NA),
texture = c("x", "x", "x", "CE", "x", "x", NA),
lieutex = c("x", "x", "x", "x", "Muck", "x", NA)
)
cbind(
organic = is_NRCS_horizon_organic(x),
expected_organic = c(FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, NA)
)
## Not run:
if (curl::has_internet()) {
x <- fetch_soils_from_NRCS_SDA(bind_params = c(471168, 1606800))
is_NRCS_horizon_organic(x)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.