depths: Converts depths into suitable mean points for each horizon in...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/depths.R

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

1
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 for details.

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.

Author(s)

Gianluca Filippa

See Also

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

Examples

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

Example output

Loading required package: aqp
This is aqp 1.17

Attaching package: 'aqp'

The following object is masked from 'package:base':

    union

Loading required package: lattice
Loading required package: munsell
Loading required package: splancs
Loading required package: sp

Spatial Point Pattern Analysis Code in S-Plus
 
 Version 2 - Spatial and Space-Time analysis

   example.depth tmp...1.
1            0-8     -4.0
2           8-40    -24.0
3            0-1     -0.5
4            1-3     -2.0
5            3-7     -5.0
6           7-18    -12.5
7          18-40    -29.0
8            0-4     -2.0
9           4-17    -10.5
10         17-30    -23.5
11           0-1     -0.5
12           1-3     -2.0
13       3-20/30    -14.0
14   20/30-30/38    -29.5
15      30/38-50    -42.0

soilprofile documentation built on May 29, 2017, 10:50 p.m.