Glance accepts a model object and returns a tibble::tibble() with exactly
one row of Spat. The summaries are typically geographic information.
Arguments
- x
A
SpatRastercreated withterra::rast()or aSpatVectorcreated withterra::vect().- ...
Ignored by this method.
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)
#> # A tibble: 1 × 10
#> geometry nrow ncol xmin xmax ymin ymax source crs crs_units
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <chr> <chr>
#> 1 polygons 9 3 2892687. 3341372. 2017622. 2.36e6 cyl.g… ETRS… meter
# SpatRaster
r <- rast(system.file("extdata/cyl_elev.tif", package = "tidyterra"))
glance(r)
#> # A tibble: 1 × 16
#> nrow ncol nlyr ncell xres yres xmin xmax ymin ymax crs crs_units
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
#> 1 126 212 1 26712 0.025 0.025 -7.08 -1.77 40.1 43.2 lon/lat… degrees
#> # ℹ 4 more variables: source <chr>, has_rgb <lgl>, has_colors <lgl>,
#> # has_time <lgl>
