Subset soil horizon data using a depth or depth interval
glom()
returns a "clod" of horizons from a SoilProfileCollection from a depth interval.
All horizons included within the specified interval are returned in their entirety (not just the portion within the interval), unless the truncate
argument is specified. Horizon intersection is based on unique ID hzidname(spc)
and attribute of interest.
If intersection at the specified boundaries ['z1', 'z2']
results in no horizon data, 'NULL' is returned with a warning containing the offending pedon ID.
If inverting results with invert
, it is possible that thick horizons (that span more than the entire glom interval) will be split into two horizons. This may make the results from ids = TRUE
different from what you expect, as they will be based on a profile with an "extra" horizon.
## S4 method for signature 'SoilProfileCollection' glom( p, z1, z2 = NULL, ids = FALSE, df = FALSE, truncate = FALSE, invert = FALSE, modality = "all" )
p |
A SoilProfileCollection |
z1 |
Top depth (required) - depth to intersect horizon; if 'z2' specified, top depth of intersection interval. |
z2 |
optional: bottom depth of intersection interval |
ids |
Return only horizon IDs? default: |
df |
Return a data.frame, by intersection with |
truncate |
Truncate horizon top and bottom depths to |
invert |
Get the horizons ranges outside the interval z1/z2? default: |
modality |
Return all horizons (default: |
The verb/function that creates a clod is "glom". "To glom" is "to steal" or to "become stuck or attached to". The word is related to the compound "glomalin", which is a glycoprotein produced by mycorrhizal fungi in soil.
A SoilProfileCollection, data.frame, or a vector of horizon IDs. NULL
if no result.
Andrew G. Brown
data(sp1, package = 'aqp') depths(sp1) <- id ~ top + bottom site(sp1) <- ~ group p <- sp1[1] foo <- glom(p, 25, 100) # there are 4 horizons in the clod glommed from depths 25 to 100 on profile 1 in sp1 nrow(foo)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.