data(sp1)
depths(sp1) <- id ~ top + bottom
# generate depth-class matrix
sdc <- getSoilDepthClass(sp1, name = 'name')
# inspect
head(sdc)
# join back into sp1 as site-level data
site(sp1) <- sdc
if (FALSE) {
# sample data
data(gopheridge, package='soilDB')
getSoilDepthClass(gopheridge, name = 'hzname')
}
Run the code above in your browser using DataLab