# construct a fake profile
spc <- data.frame(id=1, taxsubgrp = "Lithic Haploxerepts",
hzname = c("A","AB","Bw","BC","R"),
hzdept = c(0, 20, 32, 42, 49),
hzdepb = c(20, 32, 42, 49, 200),
clay = c(19, 22, 22, 21, NA),
texcl = c("l","l","l", "l","br"),
d_value = c(5, 5, 5, 6, NA),
m_value = c(2.5, 3, 3, 4, NA),
m_chroma = c(2, 3, 4, 4, NA))
# promote to SoilProfileCollection
depths(spc) <- id ~ hzdept + hzdepb
# set required metadata
hzdesgnname(spc) <- 'hzname'
hztexclname(spc) <- 'texcl'
hzmetaname(spc, 'clay') <- 'clay'
# print results in table
getCambicBounds(spc)
Run the code above in your browser using DataLab