record_flagger: Flags records that occur in countries that are not reported...

View source: R/record_flagger.R

record_flaggerR Documentation

Flags records that occur in countries that are not reported in either infected_countries or CABI datasheet

Description

record_flagger cross references occurrence records against either a vector of country names with established populations specified in infected_countries or those presented in a CABI distribution file. It will then either flag or automatically remove occurrence records that occur in countries outside one of these lists.

Usage

record_flagger(
  occurrence_records,
  infected_countries,
  cabi_ref,
  manual_check = FALSE,
  return_df = FALSE
)

Arguments

occurrence_records

A data.frame, sf object or SpatialPoints* object, or a path to a .csv file containing the locations of species of interest. (If a data.frame is provided, it must contain the named columns "Latitude" and "Longitude").

infected_countries

Character vector of countries with known established populations.

cabi_ref

Character. The path to a .csv file downloaded from a CABI datasheet containing the country-scale distributional data for the pest. Note that if infected_countries the CABI data will not be used.

manual_check

Logical. Allows interactive selection of which unverified points to retain. Interactive map will only be produced if unverified records are present and if this argument is set to TRUE.

return_df

Logical. Return the object as a data.frame or as an sf object (i.e. TRUE, the default).

Value

A data.frame or an sf points object flagging records found in countries in which do not occur in infected_countries OR is not reported as being present in CABI.


jscamac/edmaps documentation built on June 11, 2022, 1:26 a.m.