Plot.trans: Plot continuous surface transformation

View source: R/Plot_trans.R

Plot.transR Documentation

Plot continuous surface transformation

Description

Plots a transformed continuous resistance surface against the original resistance values

Usage

Plot.trans(PARM, 
                  Resistance, 
                  transformation,
                  scale, 
                  print.dir,
                  marginal.plot, 
                  marg.type, 
                  Name)

Arguments

PARM

Parameters to transform conintuous surface or resistance values of categorical surface. A vector of two parameters is required. The first term is the value of shape parameter (c), and the second term is the value of maximum scale parameter (b)

Resistance

Accepts three types of inputs. Provide either the path to the raw, untransformed resistance surface file or specify an R raster object. Alternatively, supply a vector with the minimum and manximum values (e.g., c(1,10))

transformation

Transformation equation to apply. Can be provided as the name of the transformation or its numeric equivalent (see details)

scale

The standard deviation, in number of raster cells, to use when applying Gaussian kernel smoothing. This is the 'sigma' parameter in the 'kernel2dsmooth' function. (Default = NULL)

print.dir

Specify the directory where a .tiff of the transformation will be written (Default = NULL)

marginal.plot

Logical. Should distribution plots be added to the margins of the response plot (Default = TRUE). Requires that the resistance surface be specified for 'Resistance'.

marg.type

Type of marginal plot to add. One of: [density, histogram, boxplot]. See ggMarginal

Name

Name of resistance surface being transformed (optional). This will be added to the output file name.

Details

This function will create a ggplot object and plot, so it requires ggplot2 to be installed.
Equation names can be:

1 = "Inverse-Reverse Monomolecular"
2 = "Inverse-Reverse Ricker"
3 = "Monomolecular"
4 = "Ricker"
5 = "Reverse Monomolecular"
6 = 'Reverse Ricker"
7 = "Inverse Monomolecular"
8 = "Inverse Ricker"
9 = "Distance"

The "Distance" equation sets all cell values equal to 1. Because of the flexibility of the Ricker function to take a monomolecular shape (try Plot.trans(PARM=c(10,100), Resistance=c(1,10), transformation="Ricker") to see this), whenever a shape parameter >6 is selected in combination with a Ricker family transformation, the transformation reverts to a Distance transformation. In general, it seems that using a combination of intermediate Ricker and Monomolecular transformations provides the best, most flexible coverage of parameter space. This constraint has not been implemented in the Plot.tans function.

Value

plot of transformed resistance values against original resistance values

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.