Skip to contents

If for some reason we modify the geographic layer, for example, to add a new calculated variable, we can set that layer to become the new geographic layer of the geolayer object using this function.

Usage

set_layer(gl, layer)

# S3 method for geolayer
set_layer(gl, layer)

Arguments

gl

A geolayer object.

layer

A sf object.

Value

A geolayer object.

Examples


gl <- mrs_db_geo |>
  as_geolayer()

l <- gl |>
  get_layer()

l$tpc_001 <- l$var_002 * 100 / l$var_001

gl <- gl |>
  set_layer(l)