test_spotter: Test spotter function coverage

Description Usage Arguments Details Value Author(s)

View source: R/events.R

Description

Tests the coverage of a spotter function

Usage

1
test_spotter(spotter, data, unspotted = TRUE)

Arguments

spotter

a spotter function

data

a vector of character test data

unspotted

whether to also list strings to which the spotter returns FALSE

Details

This is a test function to runs a spotter function over a set of strings and reports which strings are spotted and which are not. It's mostly useful to ensure that any regular expressions given to spotter (i.e. when re=TRUE) have the right coverage before using the spotter function to select events from your data.

Value

the elements of data that the spotter spots, i.e. returns TRUE to, and also optionally the elements which the spotter ignores, i.e. returns FALSE to.

Author(s)

Will Lowe


conjugateprior/events documentation built on May 13, 2019, 9:56 p.m.