Learn R Programming

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

terra (version 0.7-4)

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

202,413

Version

0.7-4

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 23rd, 2020

Functions in terra (0.7-4)

clamp

Clamp values
boundaries

Detect boundaries (edges)
contour

Contour plot
diff

diff
atan2

Two argument arc-tangent
dimensions

Dimensions of a SpatRaster or SpatVector
extend

Extend
draw

Draw a polygon, line, extent, or points
buffer

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

C++ classes
cover

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

Check for longitude/latitude crs
focal

Focal values
freq

Frequency table
local

Local statistics
lapp

Apply a function to layers of a SpatRaster, or to sub-datasets of a SpatStack
compareGeom

Compare geometries of SpatRaster objects
names

Names of Spat objects
coerce

Coercion to other object types
interpolate

Interpolate
c

Combine SpatRasters
align

Align a SpatExtent with a SpatRaster
modal

modal value
merge

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

Classify (or reclassify) cell values
density

Density plot
rapp

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

GDALinfo
crop

Cut out a geographic subset
geom

Get the geometry (coordinates) of a SpatVector
click

Query by clicking on a map
crs

Get or set a coordinate reference system (projection)
rast

Create a SpatRaster
disaggregate

Disaggregate raster cells
head and tail

Show the head or tail of a Spat* object
distance

Geographic distance
factors

Factors
shift

Shift
range

Get or compute the minimum and maximum cell values
slope

Compute slopes
plot

Plot a SpatRaster or SpatVector
hist

Histogram
depth

depth of SpatRaster layers
persp

Perspective plot
mask

Mask values in a SpatRaster
extent

Create, get or set a SpatExtent
flip

Flip a raster
SpatOptions-class

Inspect of set general options for "terra"
rasterize

Rasterize vector data
read and write

Read from, or write to, file
resample

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

Add labels to a map
geomtype

Geometry type of a SpatVector
extract

Extract values from a SpatRaster
global

global statistics
rotate

Rotate a SpatRaster along longitude
vect

Create SpatVector objects
rectify

rectify a SpatRaster
trim

Trim a SpatRaster
transpose

Transpose
rep

Combine
subset

Subset of a SpatRaster
plotRGB

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

Take a regular sample
sources

Data sources of a SpatRaster
math

Arithmetic, logical and general mathematical methods
rstk

Create a SpatStack
pack

pack a Spat* object
unique

Unique values
xyRowColCell

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

ifelse for SpatRaster objects
writeRaster

Write raster data to a file
subset-vector

Subset of a SpatVector
initialize

Initialize a SpatRaster with values
pairs

Pairs plot (matrix of scatterplots)
summary

Summary
zonal

Zonal statistics
project

Change the coordinate reference system
vector-attributes

Get or replace attribute values of a SpatVector
values

Get or set cell values
quantile

SpatRaster local quantiles
predict

Spatial model predictions
zoom

Zoom in on a map
tapp

Apply a function to subsets of layers of a SpatRaster
terra-package

The terra package
replace

Replace values of a SpatRaster
writeVector

Write vector data to a file
time

time of SpatRaster layers
xmin

Get or set single values of an extent
selectRange

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

Geometric subsetting
tmpFiles

Temporary files
SpatVector-class

Class "SpatVector"
SpatExtent-class

Class "SpatExtent"
SpatRaster-class

SpatRaster class
app

Apply a function to the cells of a SpatRaster
area

Area and perimeter
aggregate

Aggregate raster cells
as.character

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

Adjacent cells
as.data.frame

Get the attributes of a SpatVector