Learn R Programming

⚠️There's a newer version (1.9-25) of this package.Take me there.

terra (version 0.9-11)

Spatial Data Analysis

Description

Methods for spatial data analysis, especially raster data. Methods allow for low-level data manipulation as well as high-level global, local, zonal, and focal computation. The predict and interpolate methods facilitate the use of regression type (interpolation, machine learning) models for spatial prediction. Processing of very large files is supported. See the manual and tutorials on to get started. The package is very similar to the 'raster' package; but 'terra' is simpler and faster.

Copy Link

Version

Install

install.packages('terra')

Monthly Downloads

210,465

Version

0.9-11

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

December 1st, 2020

Functions in terra (0.9-11)

align

Align a SpatExtent
adjacent

Adjacent cells
SpatRaster-class

SpatRaster class
aggregate

Aggregate raster cells
animate

Animate a SpatRaster
arith

apply a local function
SpatVector-class

Class "SpatVector"
as.spatvector

Coercion to a SpatVector, or to another SpatVector type
c

Combine SpatRasters
SpatExtent-class

Class "SpatExtent"
cells

Get cell numbers
area

Area and perimeter
app

Apply a function to the cells of a SpatRaster
buffer

Create a buffer around vector objects or raster patches
classify

Classify (or reclassify) cell values
boundaries

Detect boundaries (edges)
atan2

Two argument arc-tangent
as.character

Create a text representation of (the skeleton of) an object
clamp

Clamp values
crop

Cut out a geographic subset
colors

Color table
coerce

Coercion of a SpatRaster to other object types
as.data.frame

SpatRaster or SpatVector to data.frame
click

Query by clicking on a map
crosstab

Cross-tabulate
cover

Cover (replace) NA values with values of another raster
contour

Contour plot
crs

Get or set a coordinate reference system
compareGeom

Compare geometries of SpatRasters
ext

Create, get or set a SpatExtent
depth

depth of SpatRaster layers
diff

diff
density

Density plot
dimensions

Dimensions of a SpatRaster or SpatVector
expand

Expand
draw

Draw a polygon, line, extent, or points
disaggregate

Disaggregate raster cells
extract

Extract values from a SpatRaster
focalMat

Focal weights matrix
distance

Geographic distance
freq

Frequency table
fill

Remove holes from polygons
head and tail

Show the head or tail of a Spat* object
geomtype

Geometry type of a SpatVector
factors

Factors
flip

Flip or reverse a raster
isLonLat

Check for longitude/latitude crs
describe

describe
math

Arithmetic, logical and general mathematical methods
hist

Histogram
mask

Mask values in a SpatRaster
gdal

gdal utilities
geom

Get the geometry (coordinates) of a SpatVector
global

global statistics
merge

Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
lapp

Apply a function to layers of a SpatRaster, or to sub-datasets of a SpatDataSet
match

Value matching for SpatRasters
quantile

SpatRaster local quantiles
rasterize

Rasterize vector data
focal

Focal values
initialize

Initialize a SpatRaster with values
modal

modal value
interpolate

Interpolate
rast

Create a SpatRaster
ifel

ifelse for SpatRasters
scatterplot

Scatterplot of two SpatRaster layers
range

Get or compute the minimum and maximum cell values
rapp

Apply a function to a range of the layers of a SpatRaster
image

SpatRaster image method
subset

Subset of a SpatRaster
summarize-generics

Summarize
sds

Create a SpatDataSet
predict

Spatial model predictions
rep

Combine
project

Change the coordinate reference system
pairs

Pairs plot (matrix of scatterplots)
names

Names of Spat objects
pack

pack a Spat* object
persp

Perspective plot
origin

Origin
plot

Plot a SpatRaster
read and write

Read from, or write to, file
plotRGB

Red-Green-Blue plot of a multi-layered SpatRaster
plotVector

Plot a SpatVector
replace

Replace values of a SpatRaster
rotate

Rotate a SpatRaster along longitude
rectify

rectify a SpatRaster
resample

Transfer values of a SpatRaster to another one with a different geometry
spatSample

Take a regular sample
terra-package

The terra package
slope

Compute slopes
select

Geometric subsetting
vect

Create SpatVector objects
window

Set a window
options

Options
tmpFiles

Temporary files
unique

Unique values
trim

Trim a SpatRaster
summary

summary
sources

Data sources of a SpatRaster
tapp

Apply a function to subsets of layers of a SpatRaster
selectRange

Select the values of a range of layers, as specified by cell values in another SpatRaster
stretch

Stretch
transpose

Transpose
vector-attributes

Get or replace attribute values of a SpatVector
subset-vector

Subset of a SpatVector
zonal

Zonal statistics
separate

separate
writeRaster

Write raster data to a file
text

Add labels to a map
zoom

Zoom in on a map
units

units of SpatRaster layers
time

time of SpatRaster layers
writeVector

Write vector data to a file
shift

Shift
xmin

Get or set single values of an extent
xyRowColCell

Coordinates from a row, column or cell number and vice versa
values

Get or set cell values