data(sp1)
# promote to SPC
depths(sp1) <- id ~ top + bottom
# create new horizon ID
sp1$hzIDrev <- rev(sp1$hzID)
# set horizon designation column
hzidname(sp1) <- "hzIDrev"
# get horizon designation column
hzidname(sp1)
Run the code above in your browser using DataLab