Learn R Programming

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

terra (version 1.1-4)

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.1-4

License

GPL (>= 3)

Maintainer

Last Published

March 9th, 2021

Functions in terra (1.1-4)

SpatExtent-class

Class "SpatExtent"
align

Align a SpatExtent
NAflag

Set a value to NA
aggregate

Aggregate raster or vector data
boxplot

Box plot of SpatRaster data
SpatRaster-class

SpatRaster class
boundaries

Detect boundaries (edges)
SpatVector-class

Class "SpatVector"
app

Apply a function to the cells of a SpatRaster
buffer

Create a buffer around vector objects or raster patches
c

Combine SpatRaster or SpatVector objects
animate

Animate a SpatRaster
area

Area and perimeter
as.spatvector

Coercion to a SpatVector, or to another SpatVector type
centroids

Get centroids
arith

apply a local function
add

Add (in place) a SpatRaster to another SpatRaster object
compareGeom

Compare geometries of SpatRasters
as.character

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

Adjacent cells
describe

describe
focal

Focal values
diff

diff
convexhull

Convex hull
hist

Histogram
expand

Expand
ifel

ifelse for SpatRasters
ext

Create, get or set a SpatExtent
contour

Contour plot
mosaic

mosaic SpatRasters
dimensions

Dimensions of a SpatRaster or SpatVector and related objects
names

Names of Spat* objects
coords

Get the coordinates of SpatVector geometries or SpatRaster cells
disaggregate

Disaggregate raster cells
copy

Deep copy
clamp

Clamp values
classify

Classify (or reclassify) cell values
rectify

rectify a SpatRaster
relate

relate
atan2

Two argument arc-tangent
extract

Extract values from a SpatRaster
autocorrelation

Spatial autocorrelation
crop

Cut out a geographic subset
focalMat

Focal weights matrix
as.data.frame

SpatRaster or SpatVector to data.frame
cover

Replace values with values from another object
draw

Draw a polygon, line, extent, or points
global

global statistics
shift

Shift
scale

Scale values
head and tail

Show the head or tail of a Spat* object
scatterplot

Scatterplot of two SpatRaster layers
is.valid

Check polygon validity
click

Query by clicking on a map
barplot

Bar plot of a SpatRaster
factors

Factors
lapp

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

Color table
collapse

Collapse SpatRaster or SpatRasterDataset objects
distance

Geographic distance
cells

Get cell numbers
cartogram

Cartogram
coerce

Coercion of a SpatRaster to other object types
gdal

gdal utilities
inset

Make an inset map
erase

Erase parts of a SpatVector object
dots

Make a dot-density map
freq

Frequency table
interpolate

Interpolate
crosstab

Cross-tabulate
mask

Mask values in a SpatRaster
trim

Trim a SpatRaster
sources

Data sources of a SpatRaster
symdif

Symetrical difference
pack

pack a SpatRaster or SpatVector object
svc

Create a SpatVectorCollection
flip

Flip or reverse a raster
pairs

Pairs plot (matrix of scatterplots)
fill

Remove holes from polygons
is.lonlat

Check for longitude/latitude crs
crs

Get or set a coordinate reference system
range

Get or compute the minimum and maximum cell values
intersect

Intersection
rapp

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

modal value
geom

Get the geometry (coordinates) of a SpatVector
density

Density plot
union

Union SpatVector or SpatExtent objects
image

SpatRaster image method
depth

depth of SpatRaster layers
initialize

Initialize a SpatRaster with values
math

Arithmetic, logical and general mathematical methods
rast

Create a SpatRaster
project

Change the coordinate reference system
selectRange

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

SpatRaster local quantiles
match

Value matching for SpatRasters
terra-package

The terra package
separate

separate
spin

spin a SpatVector
tapp

Apply a function to subsets of layers of a SpatRaster
stretch

Stretch
vector-attributes

Get or replace attribute values of a SpatVector
rep

Combine
geomtype

Geometry type of a SpatVector
merge

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

Take a regular sample
xmin

Get or set single values of an extent
plotRGB

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

Write vector data to a file
near

nearby geometries
values

Get or set cell values
predict

Spatial model predictions
zoom

Zoom in on a map
linearUnits

Linear units of the coordinate reference system
lines

Add SpatVector data to a map
vect

Create SpatVector objects
select

Spatial selection
sbar

scalebar
time

time of SpatRaster layers
sds

Create a SpatRasterDataset
text

Add labels to a map
voronoi

voronoi diagram and delauny triangles
options

Options
origin

Origin
terrain

terrain characteristic
rasterize

Rasterize vector data
rescale

rescale
window

Set a window
persp

Perspective plot
plot

Make a map
rotate

Rotate a SpatRaster along longitude
read and write

Read from, or write to, file
tmpFiles

Temporary files
resample

Transfer values of a SpatRaster to another one with a different geometry
summarize-generics

Summarize
replace

Replace values of a SpatRaster
summary

summary
subset

Subset of a SpatRaster
units

units of SpatRaster or SpatRasterDataSet
subset-vector

Subset of a SpatVector
unique

Unique values
xyRowColCell

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

Zonal statistics
transpose

Transpose
writeRaster

Write raster data to a file
writeCDF

Write raster data to a NetCDF file