Learn R Programming

aqp (version 0.99-8.1)

initProfileList: Intitalize a SoilProfileList Object

Description

Initialize a SoilProfileList class object from a dataframe.

Usage

initProfileList(d, depth_units = "cm", idcol = "id")

Arguments

d
an input dataframe representing a single soil profile
depth_units
unit of measure for depth values
idcol
a column used to uniquely define this profile from others

Value

  • An object of class 'SoilProfileList'.

Details

This function will generate a SoilProfileList object by passing each soil profile in the input dataframe to link{initProfile}.

References

http://casoilresource.lawr.ucdavis.edu/

See Also

initProfile

Examples

Run this code
data(sp1)

# convert into SoilProfileList object
sp1.splist <- initProfileList(sp1)

# basic accessor functions (still in development)

# 1. get the first horizon from each soil profile 
sp1.splist[1,]

# 2 get the first profile as a SoilProfile object
sp1.splist[, 1]

# 3. get a named column from the second profile
sp1.splist[, 2][, 'name']

Run the code above in your browser using DataLab