Learn R Programming

aqp (version 1.27)

depths<-,SoilProfileCollection-method: Initialize a SoilProfileCollection from a data.frame object

Description

Initialize a SoilProfileCollection from a data.frame object

Usage

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

# S4 method for 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

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab