read.geoShape: Read geoshape file into R

View source: R/read.geoShape.R

read.geoShapeR Documentation

Read geoshape file into R

Description

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

Usage

read.geoShape(txt)

Arguments

txt

a JSON string, URL or file

Examples

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

Lchiffon/leafletCN documentation built on Jan. 31, 2024, 2:18 p.m.