Check that the data and attributes of an object are internally consistent to avoid crashing functions such as
1 2 3 4 5 6 7 8
an object of class ‘traps’, ‘capthist’ or ‘mask’
integer code for level of reporting to the console. 0 = no report, 1 = errors only, 2 = full.
numeric tolerance for deviations from transect line (m)
other arguments (not used)
Checks are performed specific to the class of ‘object’. The default method is called when no specific method is available (i.e. class not ‘traps’, ‘capthist’ or ‘mask’), and does not perform any checks.
No ‘traps’ component
Invalid ‘traps’ component reported by verify.traps
No live detections
Missing values not allowed in capthist
Live detection(s) after reported dead
More than one capture in single-catch trap(s)
More than one detection per detector per occasion at proximity detector(s)
Signal detector signal(s) less than threshold or invalid threshold
Number of rows in ‘traps’ object not compatible with reported detections
Number of rows in dataframe of individual covariates differs from capthist
Number of occasions in usage matrix differs from capthist
Detections at unused detectors
Number of coordinates does not match number of detections (‘polygon’, ‘polygonX’, ‘transect’ or ‘transectX’ detectors)
Coordinates of detection(s) outside polygons (‘polygon’ or ‘polygonX’ detectors)
Coordinates of detection(s) do not lie on any transect (‘transect’ or ‘transectX’ detectors)
Row names (animal identifiers) not unique
Levels of factor covariate(s) differ between sessions
Missing detector coordinates not allowed
Number of rows in dataframe of detector covariates differs from expected
Number of detectors in usage matrix differs from expected
Occasions with no used detectors
Polygons concave east-west (‘polygon’ detectors)
PolyID missing or not factor
Polygon detector is concave in east-west direction
Levels of factor trap covariate(s) differ between sessions
Valid x and y coordinates
Number of rows in covariates dataframe differs from expected
Levels of factor mask covariate(s) differ between sessions
Earlier errors may mask later errors: fix & re-run.
A list with the component
errors, a logical value indicating
whether any errors were found. If
object contains multi-session
data then session-specific results are contained in a further list
Full reporting is the same as ‘errors only’ except that a message is posted when no errors are found.
1 2 3 4 5 6 7 8 9 10 11 12 13
verify(captdata) ## create null (complete) usage matrix, and mess it up temptraps <- make.grid() usage(temptraps) <- matrix(1, nr = nrow(temptraps), nc = 5) usage(temptraps)[,5] <- 0 verify (temptraps) ## create mask, and mess it up tempmask <- make.mask(temptraps) verify(tempmask) tempmask[1,1] <- NA verify(tempmask)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.