gdist.prep | R Documentation |
gdistance
Creates a necessary input for optimizing resistance surfaces based on pairwise cost distances, implemented using the gdistance
library
gdist.prep(n.Pops,
response = NULL,
samples,
covariates = NULL,
formula = NULL,
transitionFunction = function(x) 1 / mean(x),
directions = 8,
longlat = FALSE,
method = 'commuteDistance',
min.max_dist = NULL,
keep = NULL)
n.Pops |
The number of populations that are being assessed |
response |
Vector of pairwise genetic distances (lower half of pairwise matrix). |
samples |
Either provide the path to a .txt file containing the xy coordinates, or provide a matrix with x values in column 1 and y values in column 2. Alternatively, you can provide a |
covariates |
Data frame of additional covariates that you want included in the MLPE model during opitmization. |
formula |
If covariates are included in the model, specify the R formula for the fixed effects portion of the MLPE model. |
transitionFunction |
The function to calculate the gdistance TransitionLayer object. See |
directions |
Directions in which cells are connected (4, 8, 16, or other). Default = 8 |
longlat |
Logical. If true, a |
method |
Specify whether pairwise distance should be calulated using the |
min.max_dist |
NOT YET SUPPORTED. Optional. Specify the minimum and maximum distance at which pairwise comparisons will be made(e.g., c(1, 50)). Euclidean distances below and above the minumum and maximum values will be omitted from the analysis. This has potential to reduce analysis time, but also reduces the number of pairwise comparisons. |
keep |
NOT YET SUPPORTED. An optional vector equal to length |
When specifying a formula, provide it as: response ~ covariate
.
the formula response
will use the vector of values specified for the response
parameter. Make sure that covariate names match variable names provided in covariates
An R object that is a required input into optimization functions
Bill Peterman <Peterman.73@osu.edu>
## Not run:
## *** TO BE COMPLETED *** ##
## End (Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.