Learn R Programming

dartR (version 1.9.9.1)

gl.map.interactive: Creates an interactive map (based on latlong) from a genlight object

Description

Creates an interactive map (based on latlong) from a genlight object

Usage

gl.map.interactive(
  x,
  matrix = NULL,
  standard = TRUE,
  symmetric = TRUE,
  ind.circles = TRUE,
  pop.labels = TRUE,
  pop.labels.cex = 12,
  provider = "Esri.NatGeoWorldMap"
)

Arguments

x

-- a genlight object [including coordinates within the latlong slot]

matrix

-- a distance matrix between populations or individuals. The matrix is visualised as lines between individuals/populations. If matrix is asymmetric two lines with arrows are plotted.

standard

-- if a matrix is provided line width will be standardised to be between 1 to 10, if set to true, otherwise taken as given.

symmetric

-- if a symmetric matrix is provided only one line is drawn based on the lower triangle of the matrix. If set to false arrows indicating the direction are used instead.

ind.circles

-- should individuals plotted as circles, default is TRUE

pop.labels

-- population labels at the center of the individuals of populations, default is TRUE

pop.labels.cex

-- size of population labels, default is 20.

provider

-- passed to leaflet

Value

plots a map

Details

A wrapper around the leaflet package. For possible background maps check as specified via the provider: http://leaflet-extras.github.io/leaflet-providers/preview/index.html

Examples

Run this code
# NOT RUN {
gl.map.interactive(bandicoot.gl)
# }

Run the code above in your browser using DataLab