team_1: Create a geometry data frame.

Description Usage Arguments Value Author(s) Examples

Description

Read a shape file and create a data frame by reforming geometry column to longitude, latitude, order, group.

See smoothMap.

Usage

1
team_1(file, tolerance = 0.1)

Arguments

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.

Value

A data frame.

Author(s)

Yang Qiao

Examples

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()

lydiaPenglish/smoothMap documentation built on May 9, 2019, 1:10 a.m.