Description Usage Arguments Value Examples
This collection of functions transforms input to a vector of USDA soil classes that
can be used as input to other functions in this package. If x
is a character
or factor, it is transformed by assuming "sand" is represented by "Sa", "S", or "Sand";
"silt" is represented by "Si" or "Silt"; "clay" is represented by "Cl", "C", or "Clay";
and "loam" is represented by "Lo", "L", or "Loam". The components must be separated by
a space. If input is numeric, the input order is sand, then clay, then silt. If silt
is provided, input checked to make sure sand + clay + silt == 1 or
sand + clay + silt == 100. If all values are less than or equal to 1, a total sum of 1
is assumed; if not, a total sum of 100 is assumed. x
is a data.frame
,
columns for sand, clay, and silt are found (as described above) and passed to
texture.class.numeric
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | texture.class(x, ..., stringsAsFactors = TRUE, validate = TRUE)
## S3 method for class 'character'
texture.class(x, ..., stringsAsFactors = TRUE,
validate = TRUE)
## S3 method for class 'numeric'
texture.class(x, clay, silt = NULL, ...,
stringsAsFactors = TRUE, validate = TRUE)
## S3 method for class 'data.frame'
texture.class(x, ..., stringsAsFactors = TRUE,
validate = TRUE)
|
x |
An object to be converted to a vector of texture classes, or a numeric vector describing sand content. |
... |
Pass to/from methods |
stringsAsFactors |
Pass TRUE to output a factor vector, FALSE will generate a character vector. |
validate |
Pass TRUE to ensure output is within the 12 USDA texture classes. |
clay |
A numeric vector describing relative clay content |
silt |
A numeric vector describing relative silt content |
A factor with levels Cl, ClLo, Lo, LoSa, Sa, SaCl, SaClLo,
SaLo, Si, SiCl, SiClLo, or SiLo; or a character vector of the above
if stringsAsFactors
is FALSE.
1 | texture.class(c("silty clay loam", "sandy clay loam", "s c l", "S C L"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.