Skip to contents

Coercing objects

Convert Spat* to other type of objects or create SpatRasters from tibbles.

as_coordinates()
Get cell number, row and column from a SpatRaster
as_spatraster()
Coerce a data frame to SpatRaster
as_tibble(<SpatRaster>) as_tibble(<SpatVector>)
Coerce a Spat* object to data frames

dplyr methods

Methods from {dplyr} implemented for Spat* objects.

tidyr methods

Methods from {tidyr} implemented for Spat* objects.

drop_na(<SpatVector>)
Drop attributes of SpatVector objects containing missing values
replace_na(<SpatRaster>) replace_na(<SpatVector>)
Replace NAs with specified values

ggplot2 utils

Geoms

Create {ggplot2} layers for Spat* objects.

autoplot(<SpatRaster>)
Create a complete ggplot for SpatRasters
geom_spatraster() stat_spatraster()
Visualise SpatRaster objects
geom_spatraster_rgb()
Visualise SpatRaster objects as images
geom_spatraster_contour() geom_spatraster_contour_filled()
Plot SpatRaster contours
geom_spatvector() geom_spatvector_label() geom_spatvector_text()
Visualise SpatVector objects

Scales

Gradient colour schemes, palettes and hypsometric tints.

Helpers

Additional set of functions provided by {tidyterra}.

compare_spatrasters()
Compare attributes of two SpatRasters
is_regular_grid()
Check if x and y positions conforms a regular grid
pull_crs()
Extract CRS on WKT format

Other functions and datasets

Miscelanea

cross_blended_hypsometric_tints_db
Cross-blended Hypsometric Tints
hypsometric_tints_db
Hypsometric palettes database
volcano2
Updated Topographic Information on Auckland's Maungawhau Volcano

About the package

tidyterra tidyterra-package
tidyterra: 'tidyverse' Methods and 'ggplot2' Utils for 'terra' Objects