Description Usage Arguments Details Value Note Author(s) See Also Examples
An interactive plot with options to select to explore points in the geographical or environmental space. The environmental space is defined by the values of two principal components from a principal components analysis on several environmental variables.
1 2 3 | geo2envpca(edat, g1, group1 = "Species", group2 = "",
world, scaling = 1, vars = c("AMT", "AP", "MTCM", "MTWM",
"PWQ", "PCQ"), showrecord = "", ext = c(-180, 180, -60, 90))
|
edat |
a dataframe containing fields with the following names: ID, x, y, Species, x_original, y_original, Correction, Modified, Exclude and the values of selected environmental variables |
g1 |
the name of the species to select |
group1 |
this is usually the column of species names |
group2 |
a second grouping variable |
world |
a shapefile of the world, where the column containing the country names must be "NAMES"; see data(wrld_simpl) |
scaling |
a value of 1 or 2 for the type of scaling of the PCA space |
vars |
a character vector of environmental variable names that will be used to define the environmental space. Values of these variables must be present in edat. |
showrecord |
the ID of a selected record to be shown on the map |
ext |
The extent, which can be specified as c(xmin, xmax, ymin, ymax) default extent c(-180, 180, -90, 90). Alternatively if ext="p" then the extent will be calculated from the coordinates of the points in the dataset. |
The selected records are marked with a red dot and ID numbers are shown. Records that are considered to be outliers can be excluded by selecting the record in the environmental space. A menu with various options is produced.
Interactive plot
plotsetup should be run first
Mark Robertson and Vernon Visser
plotsetup, geo2envid, alternatives, alternativesenv, wclim
1 2 3 4 5 6 | ## Not run:
plotsetup(6,6)
ed<-geo2envpca(edat,"Species U",group1="Species",group2="",
world,scaling=1,vars=c("bio1","bio12","bio5","bio6","bio14"),
showrecord="1981",ext="p")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.