checkrp: Input checks and reference preparation for performance calculation
Description
Checks whether r and p are valid reference and predictions. If p is a
multiple of r, recycles r to the size and shape of p. If r has
additional length 1 dimensions (usually because dimensions were dropped from p), it is
shortend to the shape of p.
Usage
checkrp(r, p)
Arguments
r
reference
p
prediction
Value
r, possibly recycled to length of p or with dimensions shortened to p.
Details
In addition, any NAs in p are transferred to r so that these samples are
excluded from counting in nsamples.
checkrp is automatically called by the performance functions, but doing so beforehand and
then setting .checked = TRUE can save time when several performance measures are to be
calculated on the same results.