Learn R Programming

cartogramR (version 1.2-0)

cartogramR-deprecated: Deprecated functions in package cartogramR.

Description

The functions listed below are deprecated and will be defunct in the near future. When possible, alternative functions with similar functionality are also mentioned. Help pages for deprecated functions are available at help("<function>-deprecated").

Please use [cartogramR::warp_features()] instead.

Usage

geom_cartogramR(sfgeom, carto, verbose = FALSE)

Value

a sf or a sfc object which contains simple feature geometry transformed

Arguments

sfgeom

a sf or a sfc object which contains simple feature geometry of types in the following `POINT`, `MULTIPOINT`, `LINESTRING`, `MULTILINESTRING`, `POLYGON`, `MULTIPOLYGON

carto

a cartogramR object

verbose

a boolean object to set on verbose mode (default to `FALSE`)

Details

The following functions are deprecated and will be made defunct; use the replacement indicated below:

  • deprecated-function: new-function

  • geom_cartogramR: warp_features

Examples

Run this code
# \donttest{
  data(usa)
  carto <- cartogramR(usa, "electors64")
  LA <- sf::st_sfc(sf::st_point(c(-118.243685, 34.052234)))
  sf::st_crs(LA) <- 4326
  moregeom <- geom_cartogramR(LA, carto)
  plot(carto)
  plot(moregeom, add=TRUE, col=2, pch=15)
# }

Run the code above in your browser using DataLab