# concatenate SoilProfileCollection objects
## Not run:
# require(plyr)
# d <- ldply(1:10, random_profile)
#
# # promote to SoilProfileCollection and plot
# depths(d) <- id ~ top + bottom
# plot(d)
#
# # split into new SoilProfileCollection objects by index
# d.1 <- d[1, ]
# d.2 <- d[2, ]
# d.345 <- d[3:5, ]
#
# # recombine, note that profiles are sorted according to ID
# d.new <- rbind(d.345, d.1, d.2)
# plot(d.new)
# ## End(Not run)
## Not run:
# # these next examples should throw an error
# # insert a missing horizon boundary
# data(sp1)
# sp1$top[1] <- NA
# depths(sp1) <- id ~ top + bottom
# ## End(Not run)
Run the code above in your browser using DataLab