Learn R Programming

geometr (version 0.2.10)

getGroups: Get the table of group attributes

Description

Get the table of group attributes

Usage

getGroups(x)

# S4 method for ANY getGroups(x)

# S4 method for geom getGroups(x)

# S4 method for Raster getGroups(x)

Arguments

x

the object from which to derive the attribute table.

Value

A tibble (or a list of tibbles per layer) of the group attributes of x.

Details

This table contains at least the column 'gid'.

When this function is called on "ANY" object, it is first tested whether that object has features (getFeatures), from which the groups can be reconstructed. If this is not the case, NULL is returned.

See Also

Other getters: getCRS(), getCols(), getExtent(), getFeatures(), getHistory(), getLayers(), getNames(), getPoints(), getRes(), getRows(), getType(), getWindow()

Examples

Run this code
# NOT RUN {
getGroups(x = gtGeoms$polygon)

# for raster objects, groups are pixels with the same value and their
# attributes are in the raster attribute table (RAT)
getGroups(x = gtRasters)
# }

Run the code above in your browser using DataLab