Learn R Programming

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

terra (version 0.9-8)

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

202,413

Version

0.9-8

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

November 13th, 2020

Functions in terra (0.9-8)

SpatRaster-class

SpatRaster class
align

Align a SpatExtent
SpatExtent-class

Class "SpatExtent"
app

Apply a function to the cells of a SpatRaster
animate

Animate a SpatRaster
aggregate

Aggregate raster cells
area

Area and perimeter
adjacent

Adjacent cells
arith

apply a local function
SpatVector-class

Class "SpatVector"
as.character

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

Get cell numbers
boundaries

Detect boundaries (edges)
depth

depth of SpatRaster layers
atan2

Two argument arc-tangent
compareGeom

Compare geometries of SpatRasters
buffer

Create a buffer around vector objects or raster patches
diff

diff
as.data.frame

Get the attributes of a SpatVector
crs

Get or set a coordinate reference system
fill

Remove holes from polygons
flip

Flip a raster
coerce

Coercion to other object types
clamp

Clamp values
c

Combine SpatRasters
freq

Frequency table
contour

Contour plot
describe

describe
expand

Expand
colors

Color table
ext

Create, get or set a SpatExtent
modal

modal value
focalMat

Focal weights matrix
dimensions

Dimensions of a SpatRaster or SpatVector
focal

Focal values
merge

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

Get or compute the minimum and maximum cell values
geom

Get the geometry (coordinates) of a SpatVector
slope

Compute slopes
names

Names of Spat objects
disaggregate

Disaggregate raster cells
interpolate

Interpolate
classify

Classify (or reclassify) cell values
distance

Geographic distance
density

Density plot
geomtype

Geometry type of a SpatVector
click

Query by clicking on a map
rapp

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

Data sources of a SpatRaster
writeVector

Write vector data to a file
terra-package

The terra package
crop

Cut out a geographic subset
xyRowColCell

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

Draw a polygon, line, extent, or points
xmin

Get or set single values of an extent
options

Options
global

global statistics
isLonLat

Check for longitude/latitude crs
pairs

Pairs plot (matrix of scatterplots)
extract

Extract values from a SpatRaster
cover

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

Zonal statistics
factors

Factors
origin

Origin
rast

Create a SpatRaster
pack

pack a Spat* object
mask

Mask values in a SpatRaster
lapp

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

SpatRaster local quantiles
project

Change the coordinate reference system
spatSample

Take a regular sample
hist

Histogram
head and tail

Show the head or tail of a Spat* object
persp

Perspective plot
rectify

rectify a SpatRaster
rep

Combine
stretch

Stretch
ifel

ifelse for SpatRasters
scatterplot

Scatterplot of two SpatRaster layers
select

Geometric subsetting
shift

Shift
selectRange

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

Create a SpatDataSet
text

Add labels to a map
match

Value matching for SpatRasters
summarize-generics

Summarize
subset

Subset of a SpatRaster
subset-vector

Subset of a SpatVector
trim

Trim a SpatRaster
initialize

Initialize a SpatRaster with values
plot

Plot a SpatRaster
vector-attributes

Get or replace attribute values of a SpatVector
time

time of SpatRaster layers
plotRGB

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

Replace values of a SpatRaster
image

SpatRaster image method
zoom

Zoom in on a map
writeRaster

Write raster data to a file
summary

summary
tapp

Apply a function to subsets of layers of a SpatRaster
math

Arithmetic, logical and general mathematical methods
window

Set a window
tmpFiles

Temporary files
predict

Spatial model predictions
plotVector

Plot a SpatVector
transpose

Transpose
unique

Unique values
read and write

Read from, or write to, file
rotate

Rotate a SpatRaster along longitude
rasterize

Rasterize vector data
resample

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

Create SpatVector objects
values

Get or set cell values