Run_CS: Run CIRCUITSCAPE in R

View source: R/Run_CS.R

Run_CSR Documentation

Run CIRCUITSCAPE in R

Description

Execute CS from R

Usage

Run_CS(CS.inputs, 
r, 
CurrentMap = FALSE, 
full.mat = FALSE,
EXPORT.dir = NULL, 
output = "matrix", 
hidden = TRUE)

Arguments

CS.inputs

Object created from running CS.prep function

r

Accepts two types of inputs. Provide either the path to the resistance surface file (.asc) or specify an R RasterLayer object

CurrentMap

Logical. If TRUE, the cumulative current resistance map will be generated during the CS run (Default = FALSE)

full.mat

Logical (Default = FALSE). If TRUE, the full distance matrix will be generated as an R object, rather than just the lower half of the distance matrix.

EXPORT.dir

Directory where CS results should be written.Only specify if Circuitscape current map outputs are requested. It is critical that there are NO SPACES in the directory, as this may cause the function to fail.

output

Specifiy either "matrix" or "raster". "matrix" will return the lower half of the pairwise resistance matrix (default), while "raster" will return a raster object of the cumulative current map. The raster map can only be returned if CurrentMap=TRUE

hidden

Logical. If TRUE (Default), then no output from CIRCUITSCAPE will be printed to the console. Only set to FALSE when trying to troubleshoot/debug code.

Value

Vector of CIRCUITSCAPE resistance distances (lower half of "XXX_resistances.out") OR a full square distance matrix if 'full.mat' = TRUE. Alternatively, a raster object of the cumulative current map can be returned when CurrentMap = TRUE and output = "raster".

Author(s)

Bill Peterman <Peterman.73@osu.edu>

Examples

 
## Not run:
## *** TO BE COMPLETED *** ##

## End (Not run)

wpeterman/ResistanceGA documentation built on Nov. 20, 2023, 11:50 p.m.