Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

depths

Initialize a SoilProfileCollection from a data.frame object


Description

Initialize a SoilProfileCollection from a data.frame object

Usage

## S4 replacement method for signature 'SoilProfileCollection'
depths(object) <- value

## S4 replacement method for signature 'data.frame'
depths(object) <- value

Arguments

object

An object to promote to SoilProfileCollection (inherits from data.frame)

value

A formula specifying the unique profile ID, top and bottom depth column names

Examples

## init SoilProfileCollection objects from data.frame of horizon data

# load demo data
data(sp1)

# promote to SPC
depths(sp1) <- id ~ top + bottom

# plot
plot(sp1)

# number of profiles
length(sp1)

# number of horizons
nrow(sp1)

aqp

Algorithms for Quantitative Pedology

v1.29
GPL (>= 3)
Authors
Dylan Beaudette [aut, cre], Pierre Roudier [aut, ctb], Andrew Brown [aut, ctb]
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.