Description Usage Arguments Value Examples
creates a dissim_table
which is required by bbgdm
1 2 3 4 5 6 7 8 | dissim_table(sp.dat, env.dat, dism_metric = "number_non_shared",
spline_type = "ispline", spline_df = 1, spline_knots = 2,
coord.names = c("X", "Y"), intercept = FALSE, geo = FALSE,
geo.type = "euclidean")
is.dissim_table(x)
is.spline(object)
|
sp.dat |
Presence absence matrix. |
env.dat |
Matrix of covariates for bbgdm; if using own data as covariates make sure to set sim_covar=FALSE, otherwise simulated covariates will be caluclated instead. |
dism_metric |
Dissimilarity to caluclate; If "bray_curtis" calculates Bray-Curtis dissimilarity, if "number_non_shared" returns number of shared species at site_ij which can be used in a binomial model for GDM. |
spline_type |
If "ispline" calculates ispline. If "bspline" calculates bc from spline package. |
spline_df |
degrees of freedom; one can specify df rather than knots. Default = 3. |
spline_knots |
The internal breakpoints that define the spline. Default = NULL for bs spline and 1 for ispline. |
coord.names |
c("X","Y") character.vector names of coordinates. |
intercept |
logical if TRUE it only returns the dissimilarities. |
geo |
logical If true geographic distance is calculated if |
geo.type |
type of geographic distance to estimate, can call 'euclidean','greater_circle' or 'least_cost'. If least_cost is called extra parameters are required (lc_data, minr and maxr). |
x |
dissim_table class |
object |
spline class object |
dissim_table dissimilarity table; creates a table of dissimilarities, and difference of covariates between each sites_ij. If select dissim="number_non_shared", will return "nonsharedspp_ij","sumspp_ij", which can be used as response variables in a binomial bbgdm.
1 2 3 | x <- matrix(rbinom(100,1,.5),10,10) #toy presence absence matrix
y <- simulate_covariates(x,4)
diff_table <- dissim_table(x,y,dism_metric="number_non_shared")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.