# trivial example, not very interesting
data(sp1)
depths(sp1) <- id ~ top + bottom
# convert Munsell -> sRGB triplets
rgb.data <- munsell2rgb(sp1$hue, sp1$value, sp1$chroma, return_triplets = TRUE)
sp1$r <- rgb.data$r
sp1$g <- rgb.data$g
sp1$b <- rgb.data$b
# extract color signature
pig <- soilColorSignature(sp1)
Run the code above in your browser using DataLab