All functions

Arith-methods Arith,Extent,numeric-method Arith,Raster,Raster-method Arith,Raster,missing-method Arith,RasterLayer,logical-method Arith,RasterLayer,numeric-method Arith,RasterLayerSparse,numeric-method Arith,RasterStackBrick,logical-method Arith,RasterStackBrick,numeric-method Arith,logical,RasterLayer-method Arith,logical,RasterStackBrick-method Arith,numeric,Extent-method Arith,numeric,RasterLayer-method Arith,numeric,RasterLayerSparse-method Arith,numeric,RasterStackBrick-method +,SpatialPolygons,SpatialPolygons-method +,SpatialLines,SpatialLines-method +,SpatialPoints,SpatialPoints-method -,SpatialPolygons,SpatialPolygons-method *,SpatialPolygons,SpatialPolygons-method

Arithmetic with Raster* objects

Compare-methods Compare,Extent,Extent-method Compare,Raster,Raster-method Compare,Raster,logical-method Compare,Raster,numeric-method Compare,logical,Raster-method Compare,numeric,Raster-method ==,BasicRaster,BasicRaster-method !=,BasicRaster,BasicRaster-method

Compare Raster* objects

Extent Extent-class show,Extent-method

Class "Extent"

KML(<RasterLayer>) KML(<RasterStackBrick>) KML(<Spatial>)

Write a KML or KMZ file

Logic-methods Logic,Raster,Raster-method is.na,Raster-method is.nan,Raster-method is.finite,Raster-method is.infinite,Raster-method !,Raster-method

Logical operators and functions

Math-methods Math2,Extent-method Math2,Raster-method Math,Raster-method Math,RasterLayerSparse-method log,Raster-method

Mathematical functions

`NAvalue<-`() NAvalue()

Set the NA value of a RasterLayer

RGB(<RasterLayer>)

Create a Red-Green-Blue Raster object

BasicRaster-class Raster-class RasterLayer-class RasterLayerSparse-class RasterStack-class RasterBrick-class RasterStackBrick-class VectorLayer-class SpatialVector-class print,Raster-method show,BasicRaster-method show,RasterLayer-method show,RasterStack-method show,RasterBrick-method print,Spatial-method

Raster* classes

SpPoly SpPolygons SpPolyPart SpExtent SpPoly-class SpPolyPart-class SpPolygons-class Rcpp_SpExtent-class Rcpp_SpPolygons-class Rcpp_SpPoly-class Rcpp_SpPolyPart-class

Rcpp classes

Summary-methods mean,Raster-method median,Raster-method Summary,Raster-method

Summary methods

addLayer() dropLayer()

Add or drop a layer

adjacent(<BasicRaster>)

Adjacent cells

aggregate(<Raster>) aggregate(<SpatialPolygons>)

Aggregate raster cells or SpatialPolygons/Lines

alignExtent()

Align an extent (object of class Extent)

animate(<RasterStackBrick>)

Animate layers of a Raster* object

approxNA(<RasterStackBrick>)

Estimate values for cell values that are NA by interpolating between layers

area(<RasterLayer>) area(<RasterStackBrick>) area(<SpatialPolygons>)

Size of cells

as.character(<Raster>) as.character(<Extent>)

Character representation of a Raster or Extent object

as.data.frame(<Raster>) as.data.frame(<SpatialPolygons>) as.data.frame(<SpatialLines>)

Get a data.frame with raster cell values, or coerce SpatialPolygons, Lines, or Points to a data.frame

as.list(<Raster>)

Create a list of RasterLayer objects

as.logical(<Raster>) as.integer(<Raster>)

Change cell values to logical or integer values

as.matrix() as.array() as.vector(<Extent>) as.vector(<Raster>)

Get a vector, matrix, or array with raster cell values

as.raster()

Coerce to a 'raster' object

atan2()

Two argument arc-tangent

Geary() Moran() MoranLocal() GearyLocal()

Spatial autocorrelation

nbands() bandnr()

Number of bands

barplot(<RasterLayer>)

Bar plot of a RasterLayer

bind(<SpatialPolygons>,<SpatialPolygons>) bind(<SpatialLines>,<SpatialLines>) bind(<SpatialPoints>,<SpatialPoints>) bind(<data.frame>,<data.frame>) bind(<list>,<missing>)

Bind Spatial* objects

blockSize(<Raster>)

Block size for writing files

boundaries(<RasterLayer>)

boundaries (edges) detection

boxplot(<RasterStackBrick>) boxplot(<RasterLayer>)

Box plot of Raster objects

brick(<character>) brick(<RasterStack>) brick(<RasterBrick>) brick(<RasterLayer>) brick(<missing>) brick(<Extent>) brick(<array>) brick(<SpatialGrid>) brick(<SpatialPixels>)

Create a RasterBrick object

buffer(<RasterLayer>) buffer(<Spatial>)

buffer

calc(<Raster>,<function>)

Calculate

cellFromRowCol() cellFromRowColCombine() cellFromRow() cellFromCol() colFromX() rowFromY() cellFromXY() cellFromLine() cellFromPolygon() fourCellsFromXY()

Get cell, row, or column number

cellStats(<RasterLayer>) cellStats(<RasterStackBrick>)

Statistics across cells

cellsFromExtent() extentFromCells()

Cells from extent, and vice versa

clamp(<Raster>) clamp(<numeric>)

Clamp values

clearValues()

Clear values

click(<Raster>) click(<SpatialGrid>) click(<SpatialPolygons>) click(<SpatialLines>) click(<SpatialPoints>)

Query by clicking on a map

clump(<RasterLayer>)

Detect clumps

beginCluster() endCluster() clusterR()

Use a multi-core cluster

colortable() `colortable<-`()

colortable

compareRaster()

Compare Raster objects

compareCRS()

Partially compare two CRS objects

contour(<RasterLayer>)

Contour plot

xmin() xmax() ymin() ymax() `xmin<-`() `xmax<-`() `ymin<-`() `ymax<-`()

Coordinates of the Extent of a Raster object

corLocal(<RasterLayer>,<RasterLayer>) corLocal(<RasterStackBrick>,<RasterStackBrick>)

Local correlation coefficient

cover(<RasterLayer>,<RasterLayer>) cover(<RasterStackBrick>,<Raster>) cover(<SpatialPolygons>,<SpatialPolygons>)

Replace NA values with values of other layers

crop(<Raster>) crop(<Spatial>)

Crop

crosstab(<Raster>,<Raster>) crosstab(<RasterStackBrick>,<missing>)

Cross-tabulate

cut()

Convert values to classes

cv(<ANY>) cv(<Raster>)

Coefficient of variation

dataType() `dataType<-`()

Data type

fromDisk() inMemory(<BasicRaster>) hasValues(<BasicRaster>)

Are values in memory and/or on disk?

density(<Raster>)

Density plot

dim(<BasicRaster>)

Dimensions of a Raster* object

direction(<RasterLayer>)

Direction

disaggregate(<Raster>)

Disaggregate

distance(<RasterLayer>,<missing>) distance(<RasterLayer>,<RasterLayer>) distance(<Spatial>,<Spatial>)

Distance

distanceFromPoints()

Distance from points

drawPoly() drawLine()

Draw a line or polygon

drawExtent()

Create an Extent object by drawing on a map

erase(<SpatialPolygons>,<SpatialPolygons>) erase(<SpatialLines>,<SpatialPolygons>)

Erase parts of a SpatialPolygons* or SpatialLines* object. The inverse of this can be done with intersect

extend(<Raster>) extend(<Extent>)

Extend

extension() `extension<-`()

Filename extensions

extent()

Extent

extract(<Raster>,<matrix>) extract(<Raster>,<SpatialLines>) extract(<Raster>,<SpatialPolygons>) extract(<SpatialPolygons>,<SpatialPoints>)

Extract values from Raster objects

[[,Raster,ANY,ANY-method [,Raster,Spatial,missing-method [,Raster,RasterLayer,missing-method [,Raster,Extent,missing-method [,Raster,numeric,numeric-method [,Raster,numeric,missing-method [,Raster,missing,numeric-method [,Raster,matrix,missing-method [,Raster,missing,missing-method [,Raster,logical,missing-method [,Extent,numeric,missing-method [,Extent,missing,missing-method

Indexing to extract values of a Raster* object

minValue() maxValue()

Minimum and maximum values

is.factor() as.factor() levels() ratify(<Raster>) factorValues() deratify() asFactor()

Factors

filename()

Filename

filledContour()

Filled contour plot

flip(<RasterLayer>) flip(<RasterStackBrick>)

Flip

flowPath()

Flow path

focal(<RasterLayer>)

Focal values

focalWeight()

Focal weights matrix

freq(<RasterLayer>) freq(<RasterStackBrick>)

Frequency table

gain() `gain<-`() offs() `offs<-`()

Gain and offset of values on file

geom(<SpatialPolygons>) geom(<SpatialLines>) geom(<SpatialPoints>) geom(<data.frame>)

Get the coordinates of a vector type Spatial* object

getData() ccodes()

Get geographic data

getValues() values()

Get raster cell values

getValuesBlock(<RasterLayer>) getValuesBlock(<RasterBrick>) getValuesBlock(<RasterStack>)

Get a block of raster cell values

getValuesFocal(<Raster>)

Get focal raster cell values

gridDistance(<RasterLayer>)

Distance on a grid

hdr()

Header files

head() tail()

Show the head or tail of a Raster* object

hillShade()

Hill shading

hist(<Raster>)

Histogram

image()

Image

readIniFile()

Read a .ini file

init(<Raster>)

Initialize a Raster object with values

interpolate(<Raster>)

Interpolate

intersect(<Extent>,<ANY>) intersect(<Raster>,<ANY>) intersect(<SpatialPoints>,<ANY>) intersect(<SpatialPolygons>,<SpatialPolygons>) intersect(<SpatialPolygons>,<SpatialLines>) intersect(<SpatialPolygons>,<SpatialPoints>) intersect(<SpatialLines>,<SpatialPolygons>) intersect(<SpatialLines>,<SpatialLines>)

Intersect

isLonLat(<BasicRaster>) isLonLat(<Spatial>) couldBeLonLat(<BasicRaster>) couldBeLonLat(<Spatial>)

Is this longitude/latitude data?

layerStats()

Correlation and (weighted) covariance

layerize(<RasterLayer>,<missing>) layerize(<RasterLayer>,<RasterLayer>)

Layerize

localFun(<RasterLayer>,<RasterLayer>)

Local functions

mask(<RasterLayer>,<RasterLayer>) mask(<RasterStackBrick>,<RasterLayer>) mask(<RasterLayer>,<RasterStackBrick>) mask(<RasterStackBrick>,<RasterStackBrick>) mask(<Raster>,<Spatial>)

Mask values in a Raster object

match() `%in%`

Value matching for Raster* objects

merge(<Raster>,<Raster>) merge(<RasterStackBrick>,<missing>) merge(<Extent>,<ANY>)

Merge Raster* objects

metadata(<Raster>) `metadata<-`()

Metadata

modal(<ANY>) modal(<Raster>)

modal value

mosaic(<Raster>,<Raster>)

Merge Raster* objects using a function for overlapping areas

movingFun()

Moving functions

names(<Raster>) `names<-`(<Raster>) labels(<Raster>)

Names of raster layers

ncol() nrow() ncell() `ncol<-`() `nrow<-`()

Number or rows, columns, and cells of a Raster* object

nlayers()

Number of layers

origin() `origin<-`()

Origin

overlay(<Raster>,<Raster>) overlay(<Raster>,<missing>)

Overlay Raster objects

pairs(<RasterStackBrick>)

Pairs plot (matrix of scatterplots)

persp(<RasterLayer>) persp(<RasterStackBrick>)

Perspective plot

plot(<Raster>,<ANY>) plot(<Raster>,<Raster>)

Plot a Raster* object

plotRGB(<RasterStackBrick>)

Red-Green-Blue plot of a multi-layered Raster object

pointDistance()

Distance between points

predict(<Raster>)

Spatial model predictions

canProcessInMemory() pbCreate() pbStep() pbClose() readStart() readStop() getCluster() returnCluster()

Helper functions for programming

projectRaster() projectExtent()

Project a Raster object

crs(<ANY>) wkt(<Raster>) `crs<-`() projection() `projection<-`()

Get or set a coordinate reference system (projection)

dataSize() dataSigned()

Raster file properties

quantile()

Raster quantiles

raster-package

Overview of the functions in the raster package

raster(<character>) raster(<RasterLayer>) raster(<RasterStack>) raster(<RasterBrick>) raster(<missing>) raster(<Extent>) raster(<matrix>) raster(<Spatial>) raster(<SpatialGrid>) raster(<SpatialPixels>) raster(<sf>)

Create a RasterLayer object

rasterFromCells()

Subset a raster by cell numbers

rasterFromXYZ()

Create a Raster* object from x, y, z values

rasterOptions() tmpDir()

Global options for the raster package

rasterTmpFile() showTmpFiles() removeTmpFiles()

Temporary files

rasterToContour()

Raster to contour lines conversion

rasterToPoints()

Raster to points conversion

rasterToPolygons()

Raster to polygons conversion

rasterize(<matrix>,<Raster>) rasterize(<SpatialPoints>,<Raster>) rasterize(<SpatialLines>,<Raster>) rasterize(<SpatialPolygons>,<Raster>)

Rasterize points, lines, or polygons

readAll()

Read values from disk

reclassify(<Raster>)

Reclassify

rectify(<Raster>)

rectify a Raster object

[ [ [ [ [[ [[ [[ [[ [ [ [ [ [ [ [ [ $ $,Raster-method

Replace cell values or layers of a Raster* object

resample(<Raster>,<Raster>)

Resample a Raster object

xres() yres() res() `res<-`()

Resolution

rotate(<Raster>)

Rotate

rotated()

Do the raster cells have a rotation?

round,RasterLayer-method trunc,RasterLayer-method ceiling,RasterLayer-method floor,RasterLayer-method

Integer values

floor(<Extent>) ceiling(<Extent>)

round Extent coordinates

colFromCell() rowFromCell() rowColFromCell()

Row or column number from a cell number

rowSums(<Raster>) colSums(<Raster>)

rowSums and colSums for Raster objects

sampleInt()

Sample integer values

sampleRandom(<Raster>)

Random sample

sampleRegular(<Raster>)

Regular sample

sampleStratified(<RasterLayer>)

Stratified random sample

stackOpen() stackSave()

Save or open a RasterStack file

scale(<Raster>)

Scale values

scalebar()

scalebar

select(<Raster>) select(<Spatial>)

Geometric subsetting

setExtent() `extent<-`()

Set the extent of a RasterLayer

setMinMax()

Compute min and max values

setValues(<RasterLayer>) setValues(<RasterBrick>) setValues(<RasterStack>) setValues(<RasterLayerSparse>) `values<-`()

Set values of a Raster object

shapefile(<character>) shapefile(<Spatial>)

Read or write a shapefile

shift(<Raster>) shift(<SpatialPolygons>) shift(<SpatialLines>) shift(<SpatialPoints>)

Shift

slopeAspect()

Slope and aspect

spLines() spPolygons()

Create SpatialLines* or SpatialPolygons*

spplot(<Raster>)

Use spplot to plot a Raster* or other object

stack(<character>) stack(<Raster>) stack(<missing>) stack(<list>)

Create a RasterStack object

stackApply()

Apply a function on subsets of a RasterStack or RasterBrick

stackSelect(<RasterStackBrick>,<Raster>)

Select cell values from a multi-layer Raster* object

stretch(<Raster>)

Stretch

subs(<Raster>,<data.frame>)

Substitute values in a Raster* object

subset(<Raster>) subset(<RasterStack>)

Subset layers in a Raster* object

summary(<RasterLayer>)

Summary

symdif(<SpatialPolygons>,<SpatialPolygons>)

Symetrical difference

terrain(<RasterLayer>)

Terrain characteristics

text(<RasterLayer>) text(<RasterStackBrick>) text(<SpatialPolygons>) text(<SpatialPoints>)

Add labels to a map

t()

Transpose

trim(<Raster>) trim(<character>)

Trim

union(<Extent>,<Extent>) union(<SpatialPolygons>,<SpatialPolygons>) union(<SpatialPolygons>,<missing>) union(<SpatialLines>,<SpatialLines>) union(<SpatialPoints>,<SpatialPoints>)

Union Extent or SpatialPolygons* objects

unique(<RasterLayer>,<missing>) unique(<RasterStackBrick>,<missing>)

Unique values

unstack()

Unstack

update(<RasterLayer>) update(<RasterBrick>)

Update raster cells of files (on disk)

validCell() validCol() validRow()

Validity of a cell, column or row number

validNames()

Create valid names

weighted.mean(<RasterStackBrick>,<vector>) weighted.mean(<RasterStackBrick>,<RasterStackBrick>)

Weighted mean of rasters

Which(<RasterLayer>)

Which cells are TRUE?

which.min() which.max() whiches.min() whiches.max()

Where is the min or max value?

writeFormats()

File types for writing

writeRaster(<RasterLayer>,<character>) writeRaster(<RasterStackBrick>,<character>)

Write raster data to a file

writeStart(<RasterLayer>,<character>) writeStart(<RasterBrick>,<character>) writeValues(<RasterLayer>,<vector>) writeValues(<RasterBrick>,<matrix>) writeStop(<RasterLayer>) writeStop(<RasterBrick>)

Write values to a file

xFromCol(<Raster>,<numeric>) yFromRow(<Raster>,<numeric>) xFromCell(<Raster>,<numeric>) yFromCell(<Raster>,<numeric>) xyFromCell(<BasicRaster>,<ANY>) coordinates(<Raster>) coordinates(<Extent>)

Coordinates from a row, column or cell number

zApply()

z (time) apply

zonal(<RasterLayer>,<RasterLayer>) zonal(<RasterStackBrick>,<RasterLayer>)

Zonal statistics

zoom()

Zoom in on a map

setZ() getZ()

Get or set z-values