# load test data
data(sp2)
# promote to SPC
depths(sp2) <- id ~ top + bottom
# assign true to surface horizon
newdata <- data.frame(top = 0,
newvalue = TRUE)
# do left join
horizons(sp2) <- newdata
# inspect site table: newvalue TRUE only for horizons
# with top depth equal to zero
horizons(sp2)
Run the code above in your browser using DataLab