Learn R Programming

soilprofile (version 1.0)

depths: Converts depths into suitable mean points for each horizon in a soil profile

Description

This function is internally called in 'build.profile', but can be run by itself when you want to plot a depth function of given soil properties.

Usage

depths(depths, horizon.names)

Arguments

depths
A vector of depths in the form upper_boundary - lower_boundary or in the form upper_boundary - lower_boundary1/lower_boundary2 in case of irregular boundaries. Conversion is simply an average between upper and lower boundary. See examples
horizon.names
A vector of names, same as 'names' option in build.profile().

Value

  • A dataframe with a vector containing the given mean point for each horizon and a vector with horizon names.

See Also

'plot.profile.data.frame', 'eplot'

Examples

Run this code
##extract mean point
tmp <- depths(example$depth, example$name)
##compare mid points and original depths
data.frame(example$depth, tmp[,1])

Run the code above in your browser using DataLab