data(sp1)
# subset a single soil profile:
sp1.1 <- subset(sp1, subset=id == 'P001')
# convert into SoilProfile Class object:
sp1.1.sp <- initProfile(sp1.1)
# basic accessor functions (still in development)
# 1. get the depth (bottom of lowest horizon) from this object:
max(sp1.1.sp)
# 2. access the 2nd horizon:
sp1.1.sp[2, ]
# 3. access an attribute
sp1.1.sp[, 'name']
Run the code above in your browser using DataLab