mutate_profile {aqp} | R Documentation |
Transform a SPC (by profile) with a set of expressions
Description
mutate_profile()
is a function used for transforming SoilProfileCollections. Each expression is applied to site or horizon level attributes of individual profiles. This distinguishes this function from transform
, which is applied to all values in a collection, regardless of which profile they came from.
Usage
mutate_profile(object, ..., horizon_level = NULL)
Arguments
object |
A SoilProfileCollection |
... |
A set of comma-delimited R expressions that resolve to a transformation to be applied to a single profile e.g |
horizon_level |
logical. If |
Details
If the length an expression's result matches the number of horizons, the result is stored as a horizon-level variable. If the result has length 1, it is stored as a site-level variable. In the ambiguous case where the first and last profile have only one horizon, the results are stored in the horizon slot by default. To force results into site slot use horizon_level = FALSE
.
Value
A SoilProfileCollection.
Author(s)
Andrew G. Brown.