Description Usage Arguments Value Author(s) See Also Examples
Plots points on a world map. Records that fall outside of country boundaries appear in red and records inside country boundaries appear in blue.
1 | pointsworld(world, dat, x, y, ext = c(-180, 180, -90, 90))
|
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. |
a map of the world showing the points
Mark Robertson
geo2envid, alternatives, alternatives2, alternativesenv, errorcheck
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.