Learn R Programming

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

terra (version 1.0-7)

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. 'terra' is very similar to the 'raster' package; but 'terra' is simpler, better, and faster.

Copy Link

Version

Install

install.packages('terra')

Monthly Downloads

183,196

Version

1.0-7

License

GPL (>= 3)

Maintainer

Last Published

January 4th, 2021

Functions in terra (1.0-7)

SpatVector-class

Class "SpatVector"
align

Align a SpatExtent
NAflag

Set a value to NA
SpatExtent-class

Class "SpatExtent"
app

Apply a function to the cells of a SpatRaster
animate

Animate a SpatRaster
SpatRaster-class

SpatRaster class
add

Add (in place) a SpatRaster to another SpatRaster object
as.character

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

Adjacent cells
area

Area and perimeter
aggregate

Aggregate raster or vector data
as.spatvector

Coercion to a SpatVector, or to another SpatVector type
buffer

Create a buffer around vector objects or raster patches
c

Combine SpatRaster or SpatVector objects
arith

apply a local function
atan2

Two argument arc-tangent
convexhull

Convex hull
clamp

Clamp values
autocorrelation

Spatial autocorrelation
cells

Get cell numbers
boundaries

Detect boundaries (edges)
click

Query by clicking on a map
boxplot

Box plot of SpatRaster data
density

Density plot
barplot

Bar plot of a SpatRaster
classify

Classify (or reclassify) cell values
coerce

Coercion of a SpatRaster to other object types
crosstab

Cross-tabulate
collapse

Collapse SpatRaster or SpatRasterDataset objects
crs

Get or set a coordinate reference system
distance

Geographic distance
as.data.frame

SpatRaster or SpatVector to data.frame
centroids

Get centroids
ext

Create, get or set a SpatExtent
depth

depth of SpatRaster layers
copy

Deep copy
colors

Color table
contour

Contour plot
draw

Draw a polygon, line, extent, or points
gdal

gdal utilities
describe

describe
expand

Expand
extract

Extract values from a SpatRaster
erase

interpolate

Interpolate
match

Value matching for SpatRasters
diff

diff
cover

Replace values with values from another object
intersect

Intersection
math

Arithmetic, logical and general mathematical methods
crop

Cut out a geographic subset
dimensions

Dimensions of a SpatRaster or SpatVector and related objects
freq

Frequency table
factors

Factors
fill

Remove holes from polygons
disaggregate

Disaggregate raster cells
geomtype

Geometry type of a SpatVector
focalMat

Focal weights matrix
initialize

Initialize a SpatRaster with values
lines

Add SpatVector data to a map
head and tail

Show the head or tail of a Spat* object
global

global statistics
geom

Get the geometry (coordinates) of a SpatVector
predict

Spatial model predictions
project

Change the coordinate reference system
plotVector

Plot a SpatVector
plotRGB

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

Histogram
mask

Mask values in a SpatRaster
compareGeom

Compare geometries of SpatRasters
rasterize

Rasterize vector data
quantile

SpatRaster local quantiles
rast

Create a SpatRaster
spatSample

Take a regular sample
vector-attributes

Get or replace attribute values of a SpatVector
inset

Make an inset map
replace

Replace values of a SpatRaster
flip

Flip or reverse a raster
rotate

Rotate a SpatRaster along longitude
is.lonlat

Check for longitude/latitude crs
lapp

Apply a function to layers of a SpatRaster, or to sub-datasets of a SpatRasterDataset
focal

Focal values
linearUnits

Linear units of the coordinate reference system
is.valid

Check polygon validity
slope

Compute slopes
sources

Data sources of a SpatRaster
tapp

Apply a function to subsets of layers of a SpatRaster
pairs

Pairs plot (matrix of scatterplots)
ifel

ifelse for SpatRasters
image

SpatRaster image method
rapp

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

pack a Spat* object
modal

modal value
merge

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

Get or compute the minimum and maximum cell values
select

Spatial selection
names

Names of Spat* objects
selectRange

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

rescale
resample

Transfer values of a SpatRaster to another one with a different geometry
subset-vector

Subset of a SpatVector
options

Options
text

Add labels to a map
separate

separate
units

units of SpatRaster or SpatRasterDataSet
subset

Subset of a SpatRaster
terra-package

The terra package
persp

Perspective plot
transpose

Transpose
writeCDF

Write raster data to a NetCDF file
window

Set a window
plot

Plot a SpatRaster
shift

Shift
voronoi

voronoi diagram and delauny triangles
read and write

Read from, or write to, file
vect

Create SpatVector objects
rectify

rectify a SpatRaster
near

nearby geometries
origin

Origin
trim

Trim a SpatRaster
values

Get or set cell values
scale

Scale values
sbar

scalebar
rep

Combine
scatterplot

Scatterplot of two SpatRaster layers
relate

relate
xmin

Get or set single values of an extent
xyRowColCell

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

spin a SpatVector
summarize-generics

Summarize
sds

Create a SpatRasterDataset
writeRaster

Write raster data to a file
symdif

Symetrical difference
svc

Create a SpatVectorCollection
summary

summary
stretch

Stretch
writeVector

Write vector data to a file
zonal

Zonal statistics
zoom

Zoom in on a map
tmpFiles

Temporary files
unique

Unique values
time

time of SpatRaster layers
union

Union SpatVector or SpatExtent objects