Learn R Programming

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

terra (version 0.8-6)

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-6

License

GPL (>= 3)

Maintainer

Last Published

August 1st, 2020

Functions in terra (0.8-6)

as.character

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

Aggregate raster cells
atan2

Two argument arc-tangent
adjacent

Adjacent cells
depth

depth of SpatRaster layers
density

Density plot
SpatVector-class

Class "SpatVector"
boundaries

Detect boundaries (edges)
align

Align a SpatExtent with a SpatRaster
ifel

ifelse for SpatRaster objects
image

SpatRaster image method
SpatExtent-class

Class "SpatExtent"
area

Area and perimeter
coerce

Coercion to other object types
disaggregate

Disaggregate raster cells
as.data.frame

Get the attributes of a SpatVector
crs

Get or set a coordinate reference system
crop

Cut out a geographic subset
click

Query by clicking on a map
classify

Classify (or reclassify) cell values
clamp

Clamp values
focalMat

Focal weights matrix
distance

Geographic distance
SpatRaster-class

SpatRaster class
extent

Create, get or set a SpatExtent
range

Get or compute the minimum and maximum cell values
cells

Get cell numbers
initialize

Initialize a SpatRaster with values
buffer

Create a buffer around vector objects or raster patches
compareGeom

Compare geometries of SpatRaster objects
draw

Draw a polygon, line, extent, or points
modal

modal value
c

Combine SpatRasters
pack

pack a Spat* object
diff

diff
extract

Extract values from a SpatRaster
expand

Expand
geom

Get the geometry (coordinates) of a SpatVector
vector-attributes

Get or replace attribute values of a SpatVector
describe

describe
rep

Combine
plotVector

Plot a SpatVector
rotate

Rotate a SpatRaster along longitude
pairs

Pairs plot (matrix of scatterplots)
interpolate

Interpolate
plotRGB

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

Take a regular sample
options

Options
contour

Contour plot
subset-vector

Subset of a SpatVector
subset

Subset of a SpatRaster
terra-package

The terra package
math

Arithmetic, logical and general mathematical methods
isLonLat

Check for longitude/latitude crs
slope

Compute slopes
flip

Flip a raster
shift

Shift
focal

Focal values
cover

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

Frequency table
geomtype

Geometry type of a SpatVector
merge

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

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

Origin
names

Names of Spat objects
quantile

SpatRaster local quantiles
writeRaster

Write raster data to a file
rapp

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

global statistics
writeVector

Write vector data to a file
factors

Factors
dimensions

Dimensions of a SpatRaster or SpatVector
project

Change the coordinate reference system
replace

Replace values of a SpatRaster
predict

Spatial model predictions
stretch

Stretch
sources

Data sources of a SpatRaster
head and tail

Show the head or tail of a Spat* object
fill

Remove holes from polygons
resample

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

Add labels to a map
trim

Trim a SpatRaster
rectify

rectify a SpatRaster
read and write

Read from, or write to, file
local

Local statistics
hist

Histogram
time

time of SpatRaster layers
persp

Perspective plot
tmpFiles

Temporary files
rast

Create a SpatRaster
scatterplot

Scatterplot of two SpatRaster layers
select

Geometric subsetting
transpose

Transpose
sds

Create a SpatDataSet
mask

Mask values in a SpatRaster
zonal

Zonal statistics
rasterize

Rasterize vector data
summary

Summary
zoom

Zoom in on a map
plot

Plot a SpatRaster
tapp

Apply a function to subsets of layers of a SpatRaster
vect

Create SpatVector objects
xyRowColCell

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

Unique values
selectRange

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

Get or set cell values
xmin

Get or set single values of an extent
app

Apply a function to the cells of a SpatRaster