Learn R Programming

tidyterra (version 1.3.0)

is_grouped_spatvector: A grouped SpatVector

Description

The easiest way to create a grouped SpatVector is to call the group_by() method on a SpatVector: this will take care of capturing the unevaluated expressions for you. See group_by.SpatVector() for details.

This function is an adapted version of dplyr::is_grouped_df().

See also group_data.SpatVector() for the accessory functions that retrieve various metadata from a grouped SpatVector.

Usage

is_grouped_spatvector(x)

Value

TRUE if x is a grouped SpatVector, otherwise FALSE.

Arguments

x

A SpatVector created with terra::vect().

Examples

Run this code
v <- terra::vect(system.file("extdata/cyl.gpkg", package = "tidyterra"))

is_grouped_spatvector(v)

grouped <- group_by(v, iso2)

is_grouped_spatvector(grouped)

Run the code above in your browser using DataLab