Learn R Programming

geometr (version 0.2.5)

getGroups: Get the table of group attributes

Description

Get tabular information of the attributes of groups of features.

Usage

# S4 method for ANY
getGroups(x, ...)

# S4 method for geom getGroups(x, ...)

# S4 method for Raster getGroups(x)

# S4 method for matrix getGroups(x)

Arguments

x

the object from which to derive the attribute table.

...

subset based on logical predicates defined in terms of the columns in x or a vector of booleans. Multiple conditions are combined with &. Only rows where the condition evaluates to TRUE are kept.

Value

A table of the group attributes of x or an object where the groups table has been subsetted.

See Also

Other getters: getCRS(), getExtent(), getFeatures(), getHistory(), getLayer(), getName(), getPoints(), getRes(), 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$categorical)
# }

Run the code above in your browser using DataLab