Without grouping, one horizontal bar per test of a rule: the full bar is the
share of records the test flags, the dark part the share it is the only
reason for. With grouping (by or bins in tally_flags()), a grid of
tests by groups shaded and labelled with the share each test flags in each
group. type = "map" on a flagged data frame draws the records over the
Natural Earth land, coloured by whether the rule removes them.
Arguments
- x
A flagged data frame (
occ_flags), anocc_flaggedobject, anocc_tallyor anocc_summary.- rule
Name of the rule to draw. Default: the first rule.
- ...
For
occ_flagsandocc_flagged: passed totally_flags()(by,bins,tests). Otherwise unused.- type
For a flagged data frame:
"tests"(the shares, as for anocc_summary) or"map".- rules
Named list of rules, as in
tally_flags(). Fortype = "map"the first rule decides which records are drawn as removed. Default: one rule holding every test run.- xlim, ylim
For
type = "map": longitude and latitude limits of the map. Default: the extent of the records. The title counts the records inside the limits.
Examples
x <- data.frame(species = c("a", "a", "b", "c", "c"),
kingdom = c("P", "P", "A", "A", "A"),
decimalLongitude = c(12.58, 0, 16.37, 2.35, 2.35),
decimalLatitude = c(55.67, 0, 48.21, 48.85, 48.85))
f <- flag_occurrences(x)
plot(f)
plot(f, by = "kingdom")
plot(f, type = "map")
plot(f, type = "map", xlim = c(0, 20), ylim = c(45, 60))