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

replaceHorizons

Replace data in the horizon slot


Description

Replaces horizon data with new data.frame object.

Arguments

object

A SoilProfileCollection

value

An object inheriting data.frame

Examples

# load test data
data(sp2)

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

# one profile
p <- sp2[1,]

# 23 variables in horizon data
length(horizonNames(sp2))

# remove all but essential ones
replaceHorizons(p) <- horizons(p)[,c(idname(p),hzidname(p),horizonDepths(p))]

# inspect result (a clean slate)
horizons(p)

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.