pointsworld: Plots point records on a world map using their latitude and...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pointsworld.R

Description

Plots points on a world map. Records that fall outside of country boundaries appear in red and records inside country boundaries appear in blue.

Usage

1
pointsworld(world, dat, x, y, ext = c(-180, 180, -90, 90))

Arguments

world

a shapefile of the world, where the column containing the country names must be "NAMES"; see data(wrld_simpl)

dat

a dataframe containing the x- and y-coordinates in decimal degrees and a unique identifier for each record called ID

x

the name of the x-coordinate column in dat

y

the name of the y-coordinate column in dat

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.

Value

a map of the world showing the points

Author(s)

Mark Robertson

See Also

geo2envid, alternatives, alternatives2, alternativesenv, errorcheck

Examples

1
2
3
4
5
6
7
## Not run: 
dev.new(width=7,height=7)
a<-pointsworld(world, dat, x="x", y="y", ext = c(-180, 180, -90, 90))
a<-pointsworld(world, dat, x="x", y="y", ext = "p")
a<-pointsworld(world, dat, x="x", y="y", ext = c(10, 40, -35, -20))

## End(Not run)

biogeo documentation built on May 1, 2019, 8:05 p.m.