Learn R Programming

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

terra (version 0.5-8)

Classes and Methods for Spatial Data

Description

Classes and methods for spatial data, 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. The user-interface is very similar to that of the 'raster' package; but it is simpler and faster. Processing of very large files is supported. See the manual and tutorials on to get started.

Copy Link

Version

Install

install.packages('terra')

Monthly Downloads

183,196

Version

0.5-8

License

GPL (>= 3)

Maintainer

Last Published

April 14th, 2020

Functions in terra (0.5-8)

click

Query by clicking on a map
area

Area and perimeter
app

Apply a function to the cells of a SpatRaster
clamp

Clamp values
density

Density plot
crs

Get or set a coordinate reference system (projection)
compareGeom

Compare geometries of SpatRaster objects
contour

Contour plot
flip

Flip a raster
global

global statistics
collapse

Collapse cell values from a multi-layer SpatRaster
focal

Focal values
geomtype

Geometry type of a SpatVector
SpatDataFrame-class

C++ classes
hist

Histogram
range

Get or compute the minimum and maximum cell values
head and tail

Show the head or tail of a Spat* object
draw

Draw a polygon, line, extent, or points
distance

Geographic distance
local

Local statistics
extent

Create, get or set a SpatExtent
extend

Extend
isLonLat

Check for longitude/latitude crs
mask

Mask values in a SpatRaster
interpolate

Interpolate
pack

pack a Spat* object
vector-attributes

Get or replace attribute values of a SpatVector
pairs

Pairs plot (matrix of scatterplots)
modal

modal value
rasterize

Rasterize vector data
read and write

Read from, or write to, file
SpatExtent-class

Class "SpatExtent"
rast

Create a SpatRaster
tmpFiles

Temporary files
transpose

Transpose
values

Get cell values
zonal

Zonal statistics
slope

Compute slopes
SpatRaster-class

SpatRaster class
vect

Create SpatVector objects
xyRowColCell

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

Dimensions of a SpatRaster or SpatVector
atan2

Two argument arc-tangent
plotRGB

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

Detect boundaries (edges)
factors

Factors
c

Combine
as.data.frame

Get the attributes of a SpatVector
buffer

Create a buffer around vector objects or raster patches
disaggregate

Disaggregate raster cells
cover

Cover (replace) NA values with values of another raster
as.character

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

Cut out a geographic subset
merge

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

Data sources of a SpatRaster
shift

Shift
select

Geometric subsetting
math

Arithmetic, logical and general mathematical methods
extract

Extract values from a SpatRaster
freq

Frequency table
tapp

Apply a function to subsets of layers of a SpatRaster
persp

Perspective plot
geom

Get the geometry (coordinates) of a SpatVector
rotate

Rotate a SpatRaster along longitude
ifel

ifelse for SpatRaster objects
plot

Plot a SpatRaster or SpatVector
initialize

Initialize a SpatRaster with values
overlay

Overlay SpatRaster objects
names

Names of Spat objects
predict

Spatial model predictions
project

Change the coordinate reference system
subset

Subset of a SpatRaster
spatSample

Take a regular sample
unique

Unique values
quantile

SpatRaster local quantiles
trim

Trim a SpatRaster
writeVector

Write vector data to a file
terra-package

The "terra" package
SpatOptions-class

Inspect of set general options for "terra"
text

Add labels to a map
xmin

Get or set single values of an extent
warp

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

Subset of a SpatVector
writeRaster

Write raster data to a file
zoom

Zoom in on a map
aggregate

Aggregate raster cells
align

Align a SpatExtent with a SpatRaster
coerce

Coercion to other object types
classify

Classify (or reclassify) cell values
SpatVector-class

Class "SpatVector"
adjacent

Adjacent cells