arrivals_by_containers: Estimates pest arrivals by containers

View source: R/arrivals_by_containers.R

arrivals_by_containersR Documentation

Estimates pest arrivals by containers

Description

Estimates pest arrivals by containers.

Usage

arrivals_by_containers(
  container_weights,
  port_data,
  template_raster,
  leakage_rate,
  establishment_rate,
  outfile,
  return_rast = FALSE,
  overwrite = FALSE
)

Arguments

container_weights

An sf object or file path to a shapefile supported by OGR, as produced by container_weights().

port_data

Character. Path to csv file containing Port Names, Port Codes, Longitude, Latitude and Container volumes. Column names must be (in this order): Name, PortCode, Longitude, Latitude, Count.

template_raster

RasterLayer or file path to a raster file. This is used to define the extent and resolution of output. Must be in CRS EPSG:3577.

leakage_rate

Numeric vector of 2 values, giving the lower and upper bounds of a 95% CI for leakage rate (the number of pest leakage events in a random year).

establishment_rate

Numeric vector of 2 values, giving the lower and upper bounds of a 95% CI for establishment rate (the rate of survival, to establishment, for leakage events).

outfile

Character. Output raster file path. If probability has length > 1, the file type must support multiband rasters (e.g. GeoTiff). If not provided, raster object will be returned to R.

return_rast

Logical. Should the raster object be returned to R? Ignored if outfile is not provided.

overwrite

Logical. If TRUE and outfile is not missing, it will be overwritten if the file specified by outfile already exists.

Value

If outfile is specified, the resulting raster (multiband if probability has length > 1) is saved as a tiff at that path. If return_rast is TRUE or outfile is not specified the resulting raster object is returned, otherwise NULL is returned invisibly.

See Also

Other functions estimating arrivals: arrivals_by_fertiliser(), arrivals_by_food(), arrivals_by_goods(), arrivals_by_machinery(), arrivals_by_mail(), arrivals_by_nurserystock(), arrivals_by_residents(), arrivals_by_torres(), arrivals_by_tourists(), arrivals_by_vessels(), arrivals_by_wind()


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