thinningReview: Review impact of a sequence of thinning distances

View source: R/thinningReview.R

thinningReviewR Documentation

Review impact of a sequence of thinning distances

Description

The function applies a standard sequence of thinning distances (in kilometers) to occupancy records and determines the maximum distance for thinning by examining the impact of each prospective thinning distance on coverage of environmental conditions.

Usage

thinningReview(
  taxon = "",
  occData = NULL,
  envDataPath = NULL,
  outPath = "",
  thinDistSet = c(0.5, 1, 2, 3, 4, 5, 6, 7, 10),
  pThreshold = 0.9,
  numReplicates = 10,
  isLatLong = TRUE,
  doPlots = FALSE,
  writeResults = FALSE,
  quiet = TRUE
)

Arguments

taxon

Character. A taxon name to label output files and plots

occData

Data frame of occurrence locations, or a character object (string) giving the path to this file. An attempt is made to identify the columns storing longitude (or X) and latitude (or Y) values by partial matching on "longitude" and "latitude"

envDataPath

Character. Full path to the raster layers of environmental data to be used to assess environmental coverage. Any file format accepted by the raster package can be used, and all files in the set must have the same gridcell size, origin and resolution

outPath

Character. A path to a folder into which out will be written

thinDistSet

Numeric vector. Sequence of thinning distances (in km) to be processed

pThreshold

Numeric. Threshold p-value used to determine optimal thinning distance.

numReplicates

Integer. How many repeated thinning runs should be performed at each thinning distance?

isLatLong

Logical. Are geographic coordinates (longitude/latitude) used in occData and environmental data layers?

doPlots

Logical. Should a plot of results be written to the folder named in 'outPath'?

writeResults

Logical. Should a results summary table be saved to the folder named in 'outPath'?

quiet

Logical. Should progress messages be written to the console

Details

The sequence of thinning distances (in kilometres) should be chosen in relation to the grid cell size of the environmental data layers.

An approach which seems to be useful is to start with half the width of a grid cell and set a sequence of increments which span successive sets of grid cells.

pThreshold default of 0.9 was chosen by trails which suggested that fitted ENMs began to show poor performance when thinning caused greater loss of environmental coverage.

Value

The largest distance in the standard sequence for which environmental coverage is the closest to the threshold approached from above (i.e. is equal to or just greater than the pThreshold)


peterbat1/fitMaxnet documentation built on Sept. 17, 2024, 10:50 p.m.