check_key: Check key

View source: R/common.R

check_keyR Documentation

Check key

Description

Check if the specified set of attributes can be the key of the table.

Usage

check_key(table, key = NULL)

Arguments

table

A tibble object.

key

A vector, attributes that compose the key.

Details

The table can be a data table or a vector layer.

Value

A boolean.

See Also

Other geolevel definition functions: add_geometry(), complete_point_geometry(), coordinates_to_geometry(), geolevel(), get_empty_geometry_instances(), get_geometry()

Examples


layer_us_county <- get_level_layer(gd_us, "county")

is_key <- check_key(layer_us_county, key = c("statefp", "name"))


josesamos/geodimension documentation built on Jan. 25, 2024, 3:23 p.m.