Learn R Programming

GeoLight (version 2.0.0)

siteMap: Draws sites of residency and adds a convex hull

Description

Draw a map (from the R Package maps) showing the defined stationary sites

Usage

siteMap(crds, site, type = "points", quantiles = c(0.25, 0.75), hull = T, map.range = c("EuroAfrica", "AustralAsia", "America", "World"), ...)

Arguments

crds
a SpatialPoints or matrix object, containing x and y coordinates (in that order).
site
a numerical vector assigning each row to a particular period. Stationary periods in numerical order and values >0, migration/movement periods 0.
type
either points, or cross to show all points for each site or only show the mean position of the site with standard deviation.
quantiles
the quantile of the error bars (cross) around the median.
hull
logical, if TRUE a convex hull will be plotted around the points of each site.
map.range
some possibilities to choose defined areas ("World (default)", "EuroAfrica","America","AustralAsia").
...
Arguments to be passed to methods, such as graphical parameters (see par).

Details

Standard graphical paramters like pch, cex, lwd, lty and col are implemented. The color can be specified as either a vector of colors (e.g. c("blue", "red", ...)) or as a character string indicating a color ramp (at the moment only "random" and "rainbow" is available )

Examples

Run this code
data(hoopoe2)
 hoopoe2$tFirst <- as.POSIXct(hoopoe2$tFirst, tz = "GMT")
 hoopoe2$tSecond <- as.POSIXct(hoopoe2$tSecond, tz = "GMT")
crds <- coord(hoopoe2, degElevation = -6)
filter <- distanceFilter(hoopoe2, distance = 30)
site <- changeLight(hoopoe2, rise.prob = 0.1, set.prob = 0.1, plot = FALSE,
 summary = FALSE)$site
siteMap(crds[filter,], site[filter], xlim=c(-20,20), ylim=c(0,60),
 lwd=2, pch=20, cex=0.5, main="hoopoe2")

Run the code above in your browser using DataLab