comm_spatial_metric: Compute spatial metrics for each trait grouped taxa

View source: R/9.1.community_metrics.R

comm_spatial_metricR Documentation

Compute spatial metrics for each trait grouped taxa

Description

This function will compute user defined spatial metrics for each trait grouped taxa

Usage

comm_spatial_metric(
  trait.gr,
  fun = sum,
  user.fun = NULL,
  result.name = "richness",
  numCores = 1,
  format = "raster",
  ...
)

Arguments

trait.gr

Object returned by comm_gr_trait

fun

function to be passed to calc

user.fun

User specified function. Can be used to compute focal/window metrics

result.name

Name of directory where results will be saved

numCores

Number of cores to use for parallelization. If set to 1, no paralellization is performed

format

Character. Output file type. Argument 'format' of raster::writeRaster

...

Additional arguments:

datatype: Character. Output data type (e.g. 'INT2S' or 'FLT4S'). See dataType. If no datatype is specified, 'FLT4S' is used, unless this default value was changed with rasterOptions

overwrite: Logical. If TRUE, "filename" will be overwritten if it exists

progress: Character. Set a value to show a progress bar. Valid values are "text" and "window".

NAflag: Numeric. To overwrite the default value used to represent NA in a file

bandorder: Character. 'BIL', 'BIP', or 'BSQ'. For 'native' file formats only. For some other formats you can use the 'options' argument (see below)

options: Character. File format specific GDAL options. E.g., when writing a geotiff file you can use: options=c("COMPRESS=NONE", "TFW=YES")

You can use options=c("PROFILE=BASELINE") to create a plain tif with no GeoTIFF tags. This can be useful when writing files to be read by applications intolerant of unrecognised tags.

NetCDF files have the following additional, optional, arguments: varname, varunit, longname, xname, yname, zname, zunit

prj: Logical. If TRUE, the crs is written to a .prj file. This can be useful when writing to an ascii file or another file type that does not store the crs

setStatistics: logical. If TRUE (the default) the min and max cell values are written to file (if the format permits it)


HemingNM/ENMwizard documentation built on Jan. 4, 2024, 3:24 p.m.