Learn R Programming

geodimension (version 2.0.0)

set_level_data: Set level data

Description

Set the data table of a given level.

Usage

set_level_data(gd, level_name, data)

# S3 method for geodimension set_level_data(gd, level_name = NULL, data = NULL)

Value

A geodimension object.

Arguments

gd

A geodimension object.

level_name

A string.

data

A tibble object.

Details

We can get the table, filter or transform the data and redefine the level table.

It is checked that the attributes that have been used in the relationships remain in the table.

See Also

geolevel, get_level_data

Other geodimension definition functions: add_level(), geodimension(), transform_crs()

Examples

Run this code

ld <- gd_us |>
  get_level_data(level_name = "county",
                 inherited = TRUE)

gd_us <- gd_us |>
  set_level_data(level_name = "county",
                 data = ld)

Run the code above in your browser using DataLab