data(sp1)
depths(sp1) <- id ~ top + bottom
# apply to each profile in a collection, and save as site-level attribute
sp1$depth <- profileApply(sp1, estimateSoilDepth, name='name', top='top', bottom='bottom')
# sample data
data(gopheridge, package='soilDB')
# run on a single profile
estimateSoilDepth(gopheridge[1, ])
# apply to an entire collection
profileApply(gopheridge, estimateSoilDepth)
Run the code above in your browser using DataLab