Learn R Programming

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

terra (version 0.8-5)

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.8-5

License

GPL (>= 3)

Maintainer

Last Published

July 28th, 2020

Functions in terra (0.8-5)

as.data.frame

Get the attributes of a SpatVector
as.character

Create a text representation of (the skeleton of) an object
SpatExtent-class

Class "SpatExtent"
app

Apply a function to the cells of a SpatRaster
area

Area and perimeter
SpatRaster-class

SpatRaster class
buffer

Create a buffer around vector objects or raster patches
SpatVector-class

Class "SpatVector"
aggregate

Aggregate raster cells
click

Query by clicking on a map
c

Combine SpatRasters
classify

Classify (or reclassify) cell values
crop

Cut out a geographic subset
cover

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

Contour plot
clamp

Clamp values
atan2

Two argument arc-tangent
dimensions

Dimensions of a SpatRaster or SpatVector
cells

Get cell numbers
crs

Get or set a coordinate reference system
diff

diff
depth

depth of SpatRaster layers
density

Density plot
extent

Create, get or set a SpatExtent
extract

Extract values from a SpatRaster
boundaries

Detect boundaries (edges)
describe

describe
flip

Flip a raster
factors

Factors
geom

Get the geometry (coordinates) of a SpatVector
local

Local statistics
disaggregate

Disaggregate raster cells
fill

Remove holes from polygons
focal

Focal values
coerce

Coercion to other object types
compareGeom

Compare geometries of SpatRaster objects
initialize

Initialize a SpatRaster with values
global

global statistics
geomtype

Geometry type of a SpatVector
interpolate

Interpolate
distance

Geographic distance
focalMat

Focal weights matrix
head and tail

Show the head or tail of a Spat* object
freq

Frequency table
hist

Histogram
draw

Draw a polygon, line, extent, or points
quantile

SpatRaster local quantiles
range

Get or compute the minimum and maximum cell values
ifel

ifelse for SpatRaster objects
adjacent

Adjacent cells
names

Names of Spat objects
align

Align a SpatExtent with a SpatRaster
shift

Shift
expand

Expand
isLonLat

Check for longitude/latitude crs
rapp

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

modal value
mask

Mask values in a SpatRaster
lapp

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

Change the coordinate reference system
origin

Origin
rasterize

Rasterize vector data
slope

Compute slopes
predict

Spatial model predictions
rast

Create a SpatRaster
image

SpatRaster image method
plotRGB

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

Arithmetic, logical and general mathematical methods
persp

Perspective plot
vector-attributes

Get or replace attribute values of a SpatVector
select

Geometric subsetting
replace

Replace values of a SpatRaster
summary

Summary
plot

Plot a SpatRaster
rep

Combine
zonal

Zonal statistics
merge

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

Apply a function to subsets of layers of a SpatRaster
zoom

Zoom in on a map
selectRange

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

rectify a SpatRaster
pairs

Pairs plot (matrix of scatterplots)
pack

pack a Spat* object
trim

Trim a SpatRaster
resample

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

Unique values
values

Get or set cell values
scatterplot

Scatterplot of two SpatRaster layers
read and write

Read from, or write to, file
sds

Create a SpatDataSet
text

Add labels to a map
vect

Create SpatVector objects
rotate

Rotate a SpatRaster along longitude
subset-vector

Subset of a SpatVector
plotVector

Plot a SpatVector
time

time of SpatRaster layers
sources

Data sources of a SpatRaster
subset

Subset of a SpatRaster
stretch

Stretch
spatSample

Take a regular sample
options

Options
writeRaster

Write raster data to a file
terra-package

The terra package
writeVector

Write vector data to a file
transpose

Transpose
tmpFiles

Temporary files
xmin

Get or set single values of an extent
xyRowColCell

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