Learn R Programming

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

terra (version 0.7-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 similar to the 'raster' package; but 'terra' is simpler and faster.

Copy Link

Version

Install

install.packages('terra')

Monthly Downloads

183,196

Version

0.7-11

License

GPL (>= 3)

Maintainer

Last Published

July 1st, 2020

Functions in terra (0.7-11)

aggregate

Aggregate raster cells
as.character

Create a text representation of (the skeleton of) an object
as.data.frame

Get the attributes of a SpatVector
align

Align a SpatExtent with a SpatRaster
adjacent

Adjacent cells
area

Area and perimeter
SpatVector-class

Class "SpatVector"
app

Apply a function to the cells of a SpatRaster
SpatRaster-class

SpatRaster class
SpatExtent-class

Class "SpatExtent"
classify

Classify (or reclassify) cell values
click

Query by clicking on a map
SpatDataFrame-class

C++ classes
c

Combine SpatRasters
buffer

Create a buffer around vector objects or raster patches
atan2

Two argument arc-tangent
depth

depth of SpatRaster layers
boundaries

Detect boundaries (edges)
range

Get or compute the minimum and maximum cell values
dimensions

Dimensions of a SpatRaster or SpatVector
geom

Get the geometry (coordinates) of a SpatVector
cells

Get cell numbers
clamp

Clamp values
diff

diff
draw

Draw a polygon, line, extent, or points
disaggregate

Disaggregate raster cells
cover

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

Flip a raster
crs

Get or set a coordinate reference system (projection)
compareGeom

Compare geometries of SpatRaster objects
distance

Geographic distance
coerce

Coercion to other object types
freq

Frequency table
read and write

Read from, or write to, file
crop

Cut out a geographic subset
tapp

Apply a function to subsets of layers of a SpatRaster
density

Density plot
SpatOptions-class

Inspect of set general options for "terra"
quantile

SpatRaster local quantiles
global

global statistics
factors

Factors
extract

Extract values from a SpatRaster
focal

Focal values
trim

Trim a SpatRaster
contour

Contour plot
gdal_info

GDALinfo
extend

Extend
hist

Histogram
summary

Summary
plotRGB

Red-Green-Blue plot of a multi-layered SpatRaster
head and tail

Show the head or tail of a Spat* object
isLonLat

Check for longitude/latitude crs
lapp

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

Arithmetic, logical and general mathematical methods
sds

Create a SpatDataSet
local

Local statistics
subset

Subset of a SpatRaster
extent

Create, get or set a SpatExtent
names

Names of Spat objects
spatSample

Take a regular sample
origin

Origin
persp

Perspective plot
ifel

ifelse for SpatRaster objects
time

time of SpatRaster layers
plot

Plot a SpatRaster or SpatVector
geomtype

Geometry type of a SpatVector
vector-attributes

Get or replace attribute values of a SpatVector
pairs

Pairs plot (matrix of scatterplots)
predict

Spatial model predictions
replace

Replace values of a SpatRaster
values

Get or set cell values
project

Change the coordinate reference system
terra-package

The terra package
selectRange

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

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

pack a Spat* object
select

Geometric subsetting
rast

Create a SpatRaster
mask

Mask values in a SpatRaster
writeVector

Write vector data to a file
zonal

Zonal statistics
xyRowColCell

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

Temporary files
rapp

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

Shift
slope

Compute slopes
zoom

Zoom in on a map
initialize

Initialize a SpatRaster with values
xmin

Get or set single values of an extent
unique

Unique values
resample

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

Data sources of a SpatRaster
rotate

Rotate a SpatRaster along longitude
transpose

Transpose
interpolate

Interpolate
text

Add labels to a map
modal

modal value
rectify

rectify a SpatRaster
rep

Combine
subset-vector

Subset of a SpatVector
rasterize

Rasterize vector data
vect

Create SpatVector objects
writeRaster

Write raster data to a file