These functions consist of several conversions between sand, silt and clay to texture class and visa versa, textural modifiers to rock fragments, and grain size composition to the family particle size class.

texcl_to_ssc(texcl = NULL, clay = NULL, sample = FALSE)

ssc_to_texcl(sand = NULL, clay = NULL, as.is = FALSE, droplevels = TRUE)

texmod_to_fragvoltot(texmod = NULL, lieutex = NULL)

texture_to_taxpartsize(
  texcl = NULL,
  clay = NULL,
  sand = NULL,
  fragvoltot = NULL
)

Arguments

texcl

vector of texture classes than conform to the USDA code conventions (e.g. c|C, sil|SIL, sl|SL, cos|COS)

clay

vector of clay percentages#'

sample

logical: should ssc be random sampled from the lookup table? (default: FALSE)

sand

vector of sand percentages

as.is

logical: should character vectors be converted to factors? (default: TRUE)

droplevels

logical: indicating whether to drop unused levels in factors. This is useful when the results have a large number of unused classes, which can waste space in tables and figures.

texmod

vector of textural modifiers that conform to the USDA code conventions (e.g. gr|GR, grv|GRV)

lieutex

vector of in lieu of texture terms that conform to the USDA code conventions (e.g. gr|GR, pg|PG), only used when fragments or artifacts are > 90 percent by volume (default: NULL))

fragvoltot

vector of rock fragment percentages

Value

  • texcl_to_ssc: A data.frame containing columns "sand","silt", "clay"

  • ssc_to_texcl: A character vector containing texture class

  • texmod_to_fragvoltot: A numeric vector containing total fragment volume

  • texture_to_taxpartsize: a character vector containing "taxpartsize" classes

Details

These functions are intended to estimate missing values or check existing values. The ssc_to_texcl() function uses the same logic as the particle size estimator calculation in NASIS to classify sand and clay into texture class. The results are stored in soiltexture and used by texcl_to_ssc() as a lookup table to convert texture class to sand, silt and clay. The function texcl_to_ssc() replicates the functionality described by Levi (2017).

When sample = TRUE, the results can be used to estimate within-class, marginal distributions of sand, silt, and clay fractions. It is recommended that at least 10 samples be drawn for reasonable estimates.

Unlike the other functions, texture_to_taxpartsize() is intended to be computed on weighted averages within the family particle size control section. Also recall from the criteria that carbonate clay should be subtracted from clay content and added to silt content. Similarly, if the percent of very fine sand is known it should be subtracted from the sand, and added to the silt content. Unlike the other functions, texture_to_taxpartsize() is intended to be computed on weighted averages within the family particle size control section. Also recall from the criteria that carbonate clay should be subtracted from clay content and added to silt content. Similarly, if the percent of very fine sand is known it should be subtracted from the sand, and added to the silt content.

References

Matthew R. Levi, Modified Centroid for Estimating Sand, Silt, and Clay from Soil Texture Class, Soil Science Society of America Journal, 2017, 81(3):578-588, ISSN 1435-0661, doi: 10.2136/sssaj2016.09.0301 .

Author

Stephen Roecker

Examples

# \donttest{
# example of ssc_to_texcl()
tex <- expand.grid(sand = 0:100, clay = 0:100)
tex <- subset(tex, (sand + clay) < 101)
tex$texcl <- ssc_to_texcl(sand = tex$sand, clay = tex$clay)
head(tex)
#>   sand clay texcl
#> 1    0    0    si
#> 2    1    0    si
#> 3    2    0    si
#> 4    3    0    si
#> 5    4    0    si
#> 6    5    0    si

# example of texcl_to_ssc(texcl)
texcl <- c("cos", "s", "fs", "vfs", "lcos", "ls",
          "lfs", "lvfs", "cosl", "sl", "fsl", "vfsl", "l",
          "sil", "si", "scl", "cl", "sicl", "sc", "sic", "c"
          )
test <- texcl_to_ssc(texcl)
head(test <- cbind(texcl, test), 10)
#>    texcl sand silt clay
#> 1    cos   92    5    3
#> 2      s   92    5    3
#> 3     fs   92    5    3
#> 4    vfs   92    5    3
#> 5   lcos   82   12    6
#> 6     ls   82   12    6
#> 7    lfs   82   12    6
#> 8   lvfs   82   12    6
#> 9   cosl   65   25   10
#> 10    sl   65   25   10


# example of texcl_to_ssc(texcl, clay)
data(soiltexture)
st <- soiltexture$values
idx <- sample(1:length(st$texcl), 10)
st <- st[idx, ]
ssc <- texcl_to_ssc(texcl = st$texcl)
head(cbind(texcl = st$texcl, clay = ssc$clay))
#>      texcl  clay
#> [1,] "sicl" "33"
#> [2,] "c"    "55"
#> [3,] "cl"   "33"
#> [4,] "c"    "55"
#> [5,] "scl"  "27"
#> [6,] "ls"   "6" 


# example of texmod_to_fragvoltol()
frags <- c("gr", "grv", "grx", "pgr", "pgrv", "pgrx")
head(texmod_to_fragvoltot(frags))
#>   texmod fragvoltot_l fragvoltot_r fragvoltot_h fragvoltot_h_nopf
#> 1     gr           15           25           34                34
#> 2    grv           35           48           59                59
#> 3    grx           60           75           89                89
#> 4    pgr           15           25           34                 0
#> 5   pgrv           35           48           59                 0
#> 6   pgrx           60           75           89                 0
#>   fragvoltot_r_nopf fragvoltot_l_nopf
#> 1                25                15
#> 2                48                35
#> 3                75                60
#> 4                 0                 0
#> 5                 0                 0
#> 6                 0                 0


# example of texture_to_taxpartsize()
tex <- data.frame(texcl = c("c", "cl", "l", "ls", "s"),
                  clay  = c(55, 33, 18, 6, 3),
                  sand  = c(20, 33, 42, 82, 93),
                  fragvoltot = c(35, 15, 34, 60, 91))
tex$fpsc <- texture_to_taxpartsize(texcl = tex$texcl,
                                   clay = tex$clay,
                                   sand = tex$sand,
                                   fragvoltot = tex$fragvoltot)
head(tex)
#>   texcl clay sand fragvoltot            fpsc
#> 1     c   55   20         35 clayey-skeletal
#> 2    cl   33   33         15      fine-loamy
#> 3     l   18   42         34      fine-loamy
#> 4    ls    6   82         60  loamy-skeletal
#> 5     s    3   93         91      fragmental


# example of texture_to_taxpartsize() with carbonate clay and very fine sand
carbclay <- rnorm(5, 2, 3)
vfs <- rnorm(5, 10, 3)
st$fpsc <- texture_to_taxpartsize(texcl = tex$texcl,
                                  clay = tex$clay - carbclay,
                                  sand = tex$sand - vfs,
                                  fragvoltot = tex$fragvoltot)
#> Warning: some records are > 100% or < 0%, or the calcuated silt fraction is > 100% or < 0%
#> Warning: some of the texcl records don't match the calculated texcl via ssc_to_texcl()
head(tex)
#>   texcl clay sand fragvoltot            fpsc
#> 1     c   55   20         35 clayey-skeletal
#> 2    cl   33   33         15      fine-loamy
#> 3     l   18   42         34      fine-loamy
#> 4    ls    6   82         60  loamy-skeletal
#> 5     s    3   93         91      fragmental


# example of sample = TRUE
texcl <- rep(c("cl", "sil", "sl"), 10)
ssc1 <- cbind(texcl, texcl_to_ssc(texcl = texcl, sample = FALSE))
ssc2 <- cbind(texcl, texcl_to_ssc(texcl = texcl, sample = TRUE))
ssc1$sample <- FALSE
ssc2$sample <- TRUE
ssc  <- rbind(ssc1, ssc2)
aggregate(clay ~ sample + texcl, data = ssc, summary)
#>   sample texcl clay.Min. clay.1st Qu. clay.Median clay.Mean clay.3rd Qu.
#> 1  FALSE    cl     33.00        33.00       33.00     33.00        33.00
#> 2   TRUE    cl     27.00        30.50       33.50     32.50        34.00
#> 3  FALSE   sil     13.00        13.00       13.00     13.00        13.00
#> 4   TRUE   sil      5.00         7.50       15.00     14.20        19.75
#> 5  FALSE    sl     10.00        10.00       10.00     10.00        10.00
#> 6   TRUE    sl      0.00         4.50       13.00     10.40        15.50
#>   clay.Max.
#> 1     33.00
#> 2     39.00
#> 3     13.00
#> 4     26.00
#> 5     10.00
#> 6     18.00
# }