Learn R Programming

aqp (version 1.25)

mutate: Transform a SPC with expressions based on site or horizon level attributes

Description

mutate() is a function used for transforming SoilProfileCollections. It allows the user to specify an arbitrary number of expressions that resolve to the (re-)calculation of one or more site or horizon level attributes. For instance: mutate(spc, thickness = hzdepb - hzdept). The expressions may depend on one another, and are evaluated from left to right.

Arguments

object

A SoilProfileCollection

...

Comma-separated set of R expressions e.g. thickness = hzdepb - hzdept, hzdepm = hzdept + round(thk / 2)

Value

A SoilProfileCollection.