# load test data
data(sp2)
# promote to SPC
depths(sp2) <- id ~ top + bottom
# normalize a horizon-level attribute to site
site(sp2) <- ~ surface
# inspect site table
site(sp2)
# make some data: classify two geomorphic surfaces with numeric value
newdata <- data.frame(surface = c("holocene",
"lower riverbank"),
newvalue = c(1,2))
# do left join based on newly-normalized "surface" attribute
site(sp2) <- newdata
# inspect site table: holocene & lower riverbank have values
site(sp2)
Run the code above in your browser using DataLab