Description Usage Arguments Value Author(s) Examples
Read a shape file and create a data frame by reforming geometry column to longitude, latitude, order, group.
See smoothMap.
1 |
file |
The name of the shape (.shp) file which the data are to be read from. |
tolerance |
The tolerance value in the metric of the input object. |
A data frame.
Yang Qiao
1 2 3 4 5 6 7 | filename <- system.file("extdata", "gadm36_ISL_1.shp", package = "smoothMap")
dat <- team_1(filename, tolerance = 0.01)
if (require(ggplot2))
ggplot(dat, aes(x = long, y = lat, group = group)) +
geom_polygon(color = "black", fill = "white", size = 0.2) +
labs(x = "Longitude", y = "Latitude", title = "Iceland") +
coord_quickmap()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.