Format Data for Generalized Dissimilarity Modeling (GDM)
gdm_format.Rd
Format Data for Generalized Dissimilarity Modeling (GDM)
Usage
gdm_format(
gendist,
coords,
env,
scale_gendist = FALSE,
geodist_type = "Euclidean",
distPreds = NULL,
dist_lyr = NULL,
gdmPred = FALSE,
gdmGen = FALSE
)
Arguments
- gendist
matrix of genetic distances (must range between 0 and 1 or set scale_gendist = TRUE)
- coords
dataframe with x (i.e., longitude) and y (i.e., latitude) coordinates; must be in this order
- env
dataframe or raster object with environmental values for each coordinate; if not provided, it will be calculated based on coords/envlayers
- scale_gendist
whether to scale genetic distance data from 0 to 1 (defaults to FALSE)
- geodist_type
the type of geographic distance to be calculated; options are "Euclidean" (default) for direct distance, "topographic" for topographic distances, and "resistance" for resistance distances. Note: creation and plotting of the GDM raster is only possible for "Euclidean" distances
- dist_lyr
DEM raster for calculating topographic distances or resistance raster for calculating resistance distances
- gdmPred
whether to include the gdm formatted predictor data seperately (defaults to FALSE). This dataframe contains the site number, coordinates, and environmental values at each site
- gdmGen
whether to include the gdm formatted genetic data seperately (defaults to FALSE). This dataframe contains the genetic distance matrix with an additional column for site number.
See also
Other GDM functions:
gdm_coeffs()
,
gdm_df()
,
gdm_do_everything()
,
gdm_map()
,
gdm_plot_diss()
,
gdm_plot_isplines()
,
gdm_plot_vars()
,
gdm_run()
,
gdm_table()
,
gdm_var_sel()
,
scale01()