evalMissingData: Evaluate Missing Data

Description Usage Arguments Details Value Author(s) Examples

Description

Evaluate missing data in a SoilProfileCollection object

Usage

1
evalMissingData(x, vars, name = "hzname", p = "Cr|R|Cd")

Arguments

x

a SoilProfileCollection object

vars

a chatacter vector naming horizon-level attributes in x

name

the name of a horizon-level attribute where horizon designations are stored

p

REGEX pattern used to match non-soil horizons

Details

Data 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.

Value

A vector values ranging from 0 to 1, representing the percentage of non-NA data (as specified in vars) for each profile.

Author(s)

D.E. Beaudette

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

aqp documentation built on May 2, 2019, 4:51 p.m.