Evaluate missing data in a SoilProfileCollection object
evalMissingData(x, vars, name = "hzname", p = "Cr|R|Cd")
SoilProfileCollection objectxData completeness is evaluated by profile, based on the thickness of horizons with complete horizon-level attribute values (specified in vars) divided by the total thickness. The default REGEX pattern, p, should catch most non-soil horizons which are excluded from the evaluation. Elements of vars that do not exist in horizonNames(x) are ignored.
A vector values ranging from 0 to 1, representing the percentage of non-NA data (as specified in vars) for each profile.
# example data data(sp2) # init SPC object depths(sp2) <- id ~ top + bottom # compute data completeness sp2$data.complete <- evalMissingData(sp2, vars = c('r', 'g', 'b'), name = 'name') # rank new.order <- order(sp2$data.complete) # plot along data completeness ranking plot(sp2, plot.order=new.order) # add axis, note re-ordering of axis labels axis(side=1, at=1:length(sp2), labels = round(sp2$data.complete[new.order], 2), line=-2, cex.axis=0.75)