read.geoShape: Read geoshape file into R

Description Usage Arguments Examples

View source: R/read.geoShape.R

Description

Function for reading geojson shape file into R, come out to be a SpatialPolygonsDataFrame object

Usage

1

Arguments

txt

a JSON string, URL or file

Examples

1
2
3
4
5
if(require(sp)){
  filePath = system.file("geojson/china.json",package = "leafletCN")
  map = read.geoShape(filePath)
  plot(map)
}

Example output

Loading required package: sp

leafletCN documentation built on May 1, 2019, 9:21 p.m.