Learn R Programming

cartogramR (version 1.2-0)

from_coord_polygon: Transform from coordinates system used in the polygons to coordinates system used in flow based cartogram

Description

Apply the mapping from the coordinates system used in the polygons (caracterised by the CRS) to the coordinates system used in flow based cartogram

Usage

from_coord_polygon(coord, carto)

Value

a vector of length 2 or a two columns matrix containing xy coordinates in the coordinate systems of polygons used to build the cartogram

Arguments

coord

a vector of length 2 or a two columns matrix containing xy coordinates to transform

carto

a cartogramR object

Examples

Run this code
 # \donttest{
  data(usa)
  carto <- cartogramR(usa, "electors64")
  from_coord_polygon(c(-0.007, -0.348), carto)
 # }


Run the code above in your browser using DataLab