# Spatial Data Analysis

## Documentation for package ‘terra’ version 1.1-4

- DESCRIPTION file.
- Package NEWS.

## Help Pages

A B C D E F G H I L M N O P Q R S T U V W X Y Z misc

terra-package | The terra package

## -- A --

add<- | Add (in place) a SpatRaster to another SpatRaster object
add<--method | Add (in place) a SpatRaster to another SpatRaster object
adjacent | Adjacent cells
adjacent-method | Adjacent cells
aggregate | Aggregate raster or vector data
aggregate-method | Aggregate raster or vector data
align | Align a SpatExtent
align-method | Align a SpatExtent
animate | Animate a SpatRaster
animate-method | Animate a SpatRaster
app | Apply a function to the cells of a SpatRaster
app-method | Apply a function to the cells of a SpatRaster
area | Area and perimeter
area-method | Area and perimeter
arith | apply a local function
Arith-method | Arithmetic, logical and general mathematical methods
arith-method | apply a local function
Arith-methods | Arithmetic, logical and general mathematical methods
as.array | Coercion of a SpatRaster to other object types
as.array-method | Coercion of a SpatRaster to other object types
as.character-method | Create a text representation of (the skeleton of) an object
as.contour | Contour plot
as.contour-method | Contour plot
as.data.frame | SpatRaster or SpatVector to data.frame
as.data.frame-method | SpatRaster or SpatVector to data.frame
as.factor | Factors
as.factor-method | Factors
as.lines | Coercion to a SpatVector, or to another SpatVector type
as.lines-method | Coercion to a SpatVector, or to another SpatVector type
as.list | SpatRaster or SpatVector to data.frame
as.list-method | SpatRaster or SpatVector to data.frame
as.logical-method | Arithmetic, logical and general mathematical methods
as.matrix | Coercion of a SpatRaster to other object types
as.matrix-method | Coercion of a SpatRaster to other object types
as.points | Coercion to a SpatVector, or to another SpatVector type
as.points-method | Coercion to a SpatVector, or to another SpatVector type
as.polygons | Coercion to a SpatVector, or to another SpatVector type
as.polygons-method | Coercion to a SpatVector, or to another SpatVector type
as.vector | Coercion of a SpatRaster to other object types
as.vector-method | Coercion of a SpatRaster to other object types
atan2 | Two argument arc-tangent
atan2-method | Two argument arc-tangent
autocor | Spatial autocorrelation
autocor-method | Spatial autocorrelation

## -- B --

barplot | Bar plot of a SpatRaster
barplot-method | Bar plot of a SpatRaster
bbox-method | Create, get or set a SpatExtent
boundaries | Detect boundaries (edges)
boundaries-method | Detect boundaries (edges)
boxplot | Box plot of SpatRaster data
boxplot-method | Box plot of SpatRaster data
buffer | Create a buffer around vector objects or raster patches
buffer-method | Create a buffer around vector objects or raster patches

## -- C --

c | Combine SpatRaster or SpatVector objects
c-method | Combine SpatRaster or SpatVector objects
cartogram | Cartogram
cartogram-method | Cartogram
cats | Factors
cats-method | Factors
cats<- | Factors
cats<--method | Factors
cellFromRowCol | Coordinates from a row, column or cell number and vice versa
cellFromRowCol-method | Coordinates from a row, column or cell number and vice versa
cellFromRowColCombine | Coordinates from a row, column or cell number and vice versa
cellFromRowColCombine-method | Coordinates from a row, column or cell number and vice versa
cellFromXY | Coordinates from a row, column or cell number and vice versa
cellFromXY-method | Coordinates from a row, column or cell number and vice versa
cells | Get cell numbers
cells-method | Get cell numbers
centroids | Get centroids
centroids-method | Get centroids
clamp | Clamp values
clamp-method | Clamp values
classify | Classify (or reclassify) cell values
classify-method | Classify (or reclassify) cell values
click | Query by clicking on a map
click-method | Query by clicking on a map
colFromCell | Coordinates from a row, column or cell number and vice versa
colFromCell-method | Coordinates from a row, column or cell number and vice versa
colFromX | Coordinates from a row, column or cell number and vice versa
colFromX-method | Coordinates from a row, column or cell number and vice versa
collapse | Collapse SpatRaster or SpatRasterDataset objects
collapse-method | Collapse SpatRaster or SpatRasterDataset objects
coltab | Color table
coltab-method | Color table
coltab<- | Color table
coltab<--method | Color table
Compare-method | Arithmetic, logical and general mathematical methods
Compare-methods | Arithmetic, logical and general mathematical methods
compareGeom | Compare geometries of SpatRasters
compareGeom-method | Compare geometries of SpatRasters
contour | Contour plot
contour-method | Contour plot
convexhull | Convex hull
convexhull-method | Convex hull
coords | Get the coordinates of SpatVector geometries or SpatRaster cells
coords-method | Get the coordinates of SpatVector geometries or SpatRaster cells
copy | Deep copy
copy-method | Deep copy
cover | Replace values with values from another object
cover-method | Replace values with values from another object
crop | Cut out a geographic subset
crop-method | Cut out a geographic subset
crosstab | Cross-tabulate
crosstab-method | Cross-tabulate
crs | Get or set a coordinate reference system
crs-method | Get or set a coordinate reference system
crs<- | Get or set a coordinate reference system
crs<--method | Get or set a coordinate reference system

## -- D --

datatype | Geometry type of a SpatVector
datatype-method | Geometry type of a SpatVector
delauny | voronoi diagram and delauny triangles
delauny-method | voronoi diagram and delauny triangles
density | Density plot
density-method | Density plot
depth | depth of SpatRaster layers
depth-method | depth of SpatRaster layers
depth<- | depth of SpatRaster layers
depth<--method | depth of SpatRaster layers
desc | describe
describe | describe
describe-method | describe
diff | diff
diff-method | diff
dim | Dimensions of a SpatRaster or SpatVector and related objects
dim-method | Dimensions of a SpatRaster or SpatVector and related objects
dim<--method | Dimensions of a SpatRaster or SpatVector and related objects
disaggregate | Disaggregate raster cells
disaggregate-method | Disaggregate raster cells
distance | Geographic distance
distance-method | Geographic distance
dots | Make a dot-density map
dots-method | Make a dot-density map
draw | Draw a polygon, line, extent, or points
draw-method | Draw a polygon, line, extent, or points

## -- E --

erase | Erase parts of a SpatVector object
erase-method | Erase parts of a SpatVector object
expand | Expand
expand-method | Expand
ext | Create, get or set a SpatExtent
ext-method | Create, get or set a SpatExtent
ext<- | Create, get or set a SpatExtent
ext<--method | Create, get or set a SpatExtent
extend | Expand
extend-method | Expand
extract | Extract values from a SpatRaster
extract-method | Extract values from a SpatRaster

## -- F --

fill | Remove holes from polygons
fill-method | Remove holes from polygons
flip | Flip or reverse a raster
flip-method | Flip or reverse a raster
focal | Focal values
focal-method | Focal values
focalMat | Focal weights matrix
freq | Frequency table
freq-method | Frequency table

## -- G --

gdal | gdal utilities
gdal_version | gdal utilities
geom | Get the geometry (coordinates) of a SpatVector
geom-method | Get the geometry (coordinates) of a SpatVector
geomtype | Geometry type of a SpatVector
geomtype-method | Geometry type of a SpatVector
global | global statistics
global-method | global statistics

## -- H --

hasValues | Data sources of a SpatRaster
hasValues-method | Data sources of a SpatRaster
head | Show the head or tail of a Spat* object
head-method | Show the head or tail of a Spat* object
hist | Histogram
hist-method | Histogram

## -- I --

ifel | ifelse for SpatRasters
ifel-method | ifelse for SpatRasters
image | SpatRaster image method
image-method | SpatRaster image method
init | Initialize a SpatRaster with values
init-method | Initialize a SpatRaster with values
inset | Make an inset map
inset-method | Make an inset map
interpolate | Interpolate
interpolate-method | Interpolate
intersect | Intersection
intersect-method | Intersection
is.factor | Factors
is.factor-method | Factors
is.finite-method | Arithmetic, logical and general mathematical methods
is.infinite-method | Arithmetic, logical and general mathematical methods
is.lines | Geometry type of a SpatVector
is.lines-method | Geometry type of a SpatVector
is.lonlat | Check for longitude/latitude crs
is.lonlat-method | Check for longitude/latitude crs
is.na-method | Arithmetic, logical and general mathematical methods
is.nan-method | Arithmetic, logical and general mathematical methods
is.points | Geometry type of a SpatVector
is.points-method | Geometry type of a SpatVector
is.polygons | Geometry type of a SpatVector
is.polygons-method | Geometry type of a SpatVector
is.valid | Check polygon validity
is.valid-method | Check polygon validity
isFALSE-method | Arithmetic, logical and general mathematical methods
isLonLat | Check for longitude/latitude crs
isLonLat-method | Check for longitude/latitude crs
isTRUE-method | Arithmetic, logical and general mathematical methods

## -- L --

lapp | Apply a function to layers of a SpatRaster, or to sub-datasets of a SpatRasterDataset
lapp-method | Apply a function to layers of a SpatRaster, or to sub-datasets of a SpatRasterDataset
length | Dimensions of a SpatRaster or SpatVector and related objects
length-method | Dimensions of a SpatRaster or SpatVector and related objects
levels | Factors
levels-method | Factors
levels<- | Factors
levels<--method | Factors
linearUnits | Linear units of the coordinate reference system
linearUnits-method | Linear units of the coordinate reference system
lines | Add SpatVector data to a map
lines-method | Add SpatVector data to a map
log | Arithmetic, logical and general mathematical methods
log-method | Arithmetic, logical and general mathematical methods
Logic-method | Arithmetic, logical and general mathematical methods
Logic-methods | Arithmetic, logical and general mathematical methods
longnames | Names of Spat* objects
longnames-method | Names of Spat* objects
longnames<- | Names of Spat* objects
longnames<--method | Names of Spat* objects

## -- M --

mask | Mask values in a SpatRaster
mask-method | Mask values in a SpatRaster
match | Value matching for SpatRasters
match-method | Value matching for SpatRasters
Math-method | Arithmetic, logical and general mathematical methods
Math-methods | Arithmetic, logical and general mathematical methods
Math2-method | Arithmetic, logical and general mathematical methods
Math2-methods | Arithmetic, logical and general mathematical methods
max | Summarize
max-method | Summarize
mean | Summarize
mean-method | Summarize
median | Summarize
median-method | Summarize
merge | Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
merge-method | Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
min | Summarize
min-method | Summarize
minmax | Get or compute the minimum and maximum cell values
minmax-method | Get or compute the minimum and maximum cell values
modal | modal value
modal-method | modal value
mosaic | mosaic SpatRasters
mosaic-method | mosaic SpatRasters

## -- N --

NAflag | Set a value to NA
NAflag-method | Set a value to NA
NAflag<- | Set a value to NA
NAflag<--method | Set a value to NA
name | Names of Spat* objects
name<- | Names of Spat* objects
names | Names of Spat* objects
names-method | Names of Spat* objects
names<- | Names of Spat* objects
names<--method | Names of Spat* objects
ncell | Dimensions of a SpatRaster or SpatVector and related objects
ncell-method | Dimensions of a SpatRaster or SpatVector and related objects
ncol | Dimensions of a SpatRaster or SpatVector and related objects
ncol-method | Dimensions of a SpatRaster or SpatVector and related objects
ncol<- | Dimensions of a SpatRaster or SpatVector and related objects
ncol<--method | Dimensions of a SpatRaster or SpatVector and related objects
near | nearby geometries
near-method | nearby geometries
nlyr | Dimensions of a SpatRaster or SpatVector and related objects
nlyr-method | Dimensions of a SpatRaster or SpatVector and related objects
nlyr<- | Dimensions of a SpatRaster or SpatVector and related objects
nlyr<--method | Dimensions of a SpatRaster or SpatVector and related objects
nrow | Dimensions of a SpatRaster or SpatVector and related objects
nrow-method | Dimensions of a SpatRaster or SpatVector and related objects
nrow<- | Dimensions of a SpatRaster or SpatVector and related objects
nrow<--method | Dimensions of a SpatRaster or SpatVector and related objects
nsrc | Dimensions of a SpatRaster or SpatVector and related objects
nsrc-method | Dimensions of a SpatRaster or SpatVector and related objects

## -- O --

origin | Origin
origin-method | Origin

## -- P --

pack | pack a SpatRaster or SpatVector object
pack-method | pack a SpatRaster or SpatVector object
PackedSpatRaster-class | SpatRaster class
PackedSpatVector-class | Class "SpatVector"
pairs | Pairs plot (matrix of scatterplots)
pairs-method | Pairs plot (matrix of scatterplots)
perimeter | Area and perimeter
perimeter-method | Area and perimeter
persp | Perspective plot
persp-method | Perspective plot
plot | Make a map
plot-method | Make a map
plot-method | Scatterplot of two SpatRaster layers
plotRGB | Red-Green-Blue plot of a multi-layered SpatRaster
plotRGB-method | Red-Green-Blue plot of a multi-layered SpatRaster
points | Add SpatVector data to a map
points-method | Add SpatVector data to a map
polys | Add SpatVector data to a map
polys-method | Add SpatVector data to a map
predict | Spatial model predictions
predict-method | Spatial model predictions
project | Change the coordinate reference system
project-method | Change the coordinate reference system

## -- Q --

quantile | SpatRaster local quantiles
quantile-method | SpatRaster local quantiles

## -- R --

range | Summarize
range-method | Summarize
rapp | Apply a function to a range of the layers of a SpatRaster
rapp-method | Apply a function to a range of the layers of a SpatRaster
rast | Create a SpatRaster
rast-method | Create a SpatRaster
rasterize | Rasterize vector data
rasterize-method | Rasterize vector data
RasterSource | SpatRaster class
RasterSource-class | SpatRaster class
rats | Factors
rats-method | Factors
rats<- | Factors
rats<--method | Factors
Rcpp_RasterSource-class | SpatRaster class
Rcpp_SpatCategories-class | SpatRaster class
Rcpp_SpatExtent-class | Class "SpatExtent"
Rcpp_SpatRaster-class | SpatRaster class
Rcpp_SpatVector-class | Class "SpatVector"
readStart | Read from, or write to, file
readStart-method | Read from, or write to, file
readStop | Read from, or write to, file
readStop-method | Read from, or write to, file
readValues | Read from, or write to, file
readValues-method | Read from, or write to, file
rectify | rectify a SpatRaster
rectify-method | rectify a SpatRaster
relate | relate
relate-method | relate
rep | Combine
rep-method | Combine
res | Dimensions of a SpatRaster or SpatVector and related objects
res-method | Dimensions of a SpatRaster or SpatVector and related objects
res<- | Dimensions of a SpatRaster or SpatVector and related objects
res<--method | Dimensions of a SpatRaster or SpatVector and related objects
resample | Transfer values of a SpatRaster to another one with a different geometry
resample-method | Transfer values of a SpatRaster to another one with a different geometry
rescale | rescale
rescale-method | rescale
rev | Flip or reverse a raster
rev-method | Flip or reverse a raster
rotate | Rotate a SpatRaster along longitude
rotate-method | Rotate a SpatRaster along longitude
rowColFromCell | Coordinates from a row, column or cell number and vice versa
rowColFromCell-method | Coordinates from a row, column or cell number and vice versa
rowFromCell | Coordinates from a row, column or cell number and vice versa
rowFromCell-method | Coordinates from a row, column or cell number and vice versa
rowFromY | Coordinates from a row, column or cell number and vice versa
rowFromY-method | Coordinates from a row, column or cell number and vice versa

## -- S --

sbar | scalebar
scale | Scale values
scale-method | Scale values
sds | Create a SpatRasterDataset
sds-method | Create a SpatRasterDataset
select | Spatial selection
select-method | Spatial selection
selectRange | Select the values of a range of layers, as specified by cell values in another SpatRaster
selectRange-method | Select the values of a range of layers, as specified by cell values in another SpatRaster
separate | separate
separate-method | separate
setMinMax | Get or compute the minimum and maximum cell values
setMinMax-method | Get or compute the minimum and maximum cell values
setValues | Get or set cell values
setValues-method | Get or set cell values
shift | Shift
shift-method | Shift
show-method | Class "SpatExtent"
show-method | SpatRaster class
show-method | Class "SpatVector"
size | Dimensions of a SpatRaster or SpatVector and related objects
size-method | Dimensions of a SpatRaster or SpatVector and related objects
sources | Data sources of a SpatRaster
sources-method | Data sources of a SpatRaster
SpatCategories | SpatRaster class
SpatCategories-class | SpatRaster class
SpatExtent | Class "SpatExtent"
SpatExtent-class | Class "SpatExtent"
SpatRaster | SpatRaster class
SpatRaster-class | SpatRaster class
spatSample | Take a regular sample
spatSample-method | Take a regular sample
SpatVector | Class "SpatVector"
SpatVector-class | Class "SpatVector"
spin | spin a SpatVector
spin-method | spin a SpatVector
stdev | Summarize
stdev-method | Summarize
stretch | Stretch
stretch-method | Stretch
subset | Subset of a SpatRaster
subset-method | Subset of a SpatVector
subset-method | Subset of a SpatRaster
summary | summary
Summary-method | Summarize
summary-method | summary
Summary-methods | Summarize
svc | Create a SpatVectorCollection
svc-method | Create a SpatVectorCollection
symdif | Symetrical difference
symdif-method | Symetrical difference

## -- T --

t | Transpose
t-method | Transpose
tail | Show the head or tail of a Spat* object
tail-method | Show the head or tail of a Spat* object
tapp | Apply a function to subsets of layers of a SpatRaster
tapp-method | Apply a function to subsets of layers of a SpatRaster
terra | The terra package
terrain | terrain characteristic
terrain-method | terrain characteristic
terraOptions | Options
text | Add labels to a map
text-method | Add labels to a map
time | time of SpatRaster layers
time-method | time of SpatRaster layers
time<- | time of SpatRaster layers
time<--method | time of SpatRaster layers
tmpFiles | Temporary files
transpose | Transpose
transpose-method | Transpose
trim | Trim a SpatRaster
trim-method | Trim a SpatRaster

## -- U --

union | Union SpatVector or SpatExtent objects
union-method | Union SpatVector or SpatExtent objects
unique | Unique values
unique-method | Unique values
units | units of SpatRaster or SpatRasterDataSet
units-method | units of SpatRaster or SpatRasterDataSet
units<- | units of SpatRaster or SpatRasterDataSet
units<--method | units of SpatRaster or SpatRasterDataSet

## -- V --

values | Get or set cell values
values-method | Get or set cell values
values<- | Get or set cell values
values<--method | Get or set cell values
varnames | Names of Spat* objects
varnames-method | Names of Spat* objects
varnames<- | Names of Spat* objects
varnames<--method | Names of Spat* objects
vect | Create SpatVector objects
vect-method | Create SpatVector objects
voronoi | voronoi diagram and delauny triangles
voronoi-method | voronoi diagram and delauny triangles

## -- W --

which.max | Summarize
which.max-method | Summarize
which.min | Summarize
which.min-method | Summarize
window | Set a window
window-method | Set a window
window<- | Set a window
window<--method | Set a window
writeCDF | Write raster data to a NetCDF file
writeCDF-method | Write raster data to a NetCDF file
writeRaster | Write raster data to a file
writeRaster-method | Write raster data to a file
writeStart | Read from, or write to, file
writeStart-method | Read from, or write to, file
writeStop | Read from, or write to, file
writeStop-method | Read from, or write to, file
writeValues | Read from, or write to, file
writeValues-method | Read from, or write to, file
writeVector | Write vector data to a file
writeVector-method | Write vector data to a file

## -- X --

xFromCell | Coordinates from a row, column or cell number and vice versa
xFromCell-method | Coordinates from a row, column or cell number and vice versa
xFromCol | Coordinates from a row, column or cell number and vice versa
xFromCol-method | Coordinates from a row, column or cell number and vice versa
xmax | Get or set single values of an extent
xmax-method | Get or set single values of an extent
xmax<- | Get or set single values of an extent
xmax<--method | Get or set single values of an extent
xmin | Get or set single values of an extent
xmin-method | Get or set single values of an extent
xmin<- | Get or set single values of an extent
xmin<--method | Get or set single values of an extent
xres | Dimensions of a SpatRaster or SpatVector and related objects
xres-method | Dimensions of a SpatRaster or SpatVector and related objects
xyFromCell | Coordinates from a row, column or cell number and vice versa
xyFromCell-method | Coordinates from a row, column or cell number and vice versa

## -- Y --

yFromCell | Coordinates from a row, column or cell number and vice versa
yFromCell-method | Coordinates from a row, column or cell number and vice versa
yFromRow | Coordinates from a row, column or cell number and vice versa
yFromRow-method | Coordinates from a row, column or cell number and vice versa
ymax | Get or set single values of an extent
ymax-method | Get or set single values of an extent
ymax<- | Get or set single values of an extent
ymax<--method | Get or set single values of an extent
ymin | Get or set single values of an extent
ymin-method | Get or set single values of an extent
ymin<- | Get or set single values of an extent
ymin<--method | Get or set single values of an extent
yres | Dimensions of a SpatRaster or SpatVector and related objects
yres-method | Dimensions of a SpatRaster or SpatVector and related objects

## -- Z --

zonal | Zonal statistics
zonal-method | Zonal statistics
zoom | Zoom in on a map
zoom-method | Zoom in on a map

## -- misc --

!-method | Arithmetic, logical and general mathematical methods
$ | Get or replace attribute values of a SpatVector
$-method | Create, get or set a SpatExtent
$-method | Get or replace attribute values of a SpatVector
$-method | Subset of a SpatRaster
$<- | Get or replace attribute values of a SpatVector
$<--method | Create, get or set a SpatExtent
$<--method | Get or replace attribute values of a SpatVector
$<--method | Replace values of a SpatRaster
%in% | Value matching for SpatRasters
%in%-method | Value matching for SpatRasters
[-method | Create, get or set a SpatExtent
[-method | Extract values from a SpatRaster
[-method | Replace values of a SpatRaster
[-method | Subset of a SpatVector
[-method | Subset of a SpatRaster
[-method | Create a SpatVectorCollection
[<--method | Create, get or set a SpatExtent
[<--method | Replace values of a SpatRaster
[<--method | Create a SpatRasterDataset
[<--method | Create a SpatVectorCollection
[[-method | Get or replace attribute values of a SpatVector
[[-method | Subset of a SpatRaster
[[-method | Create a SpatVectorCollection
[[<--method | Get or replace attribute values of a SpatVector
[[<--method | Replace values of a SpatRaster