glance.Spat: Glance at an Spat* object

glance.SpatR Documentation

Glance at an ⁠Spat*⁠ object

Description

Glance accepts a model object and returns a tibble::tibble() with exactly one row of Spat. The summaries are typically geographic information.

Usage

## S3 method for class 'SpatRaster'
glance(x, ...)

## S3 method for class 'SpatVector'
glance(x, ...)

Arguments

x

A SpatRaster created with terra::rast() or a SpatVector created with terra::vect().

...

Ignored by this method.

Value

glance methods always return a one-row data frame. See Methods.

Methods

Implementation of the generic generics::glance() method for ⁠Spat*⁠. objects.

See Also

glimpse.Spat, generics::glance().

Other generics methods: required_pkgs.Spat, tidy.Spat

Examples


library(terra)

# SpatVector
v <- vect(system.file("extdata/cyl.gpkg", package = "tidyterra"))

glance(v)

# SpatRaster
r <- rast(system.file("extdata/cyl_elev.tif", package = "tidyterra"))

glance(r)


tidyterra documentation built on March 11, 2026, 9:08 a.m.