Learn R Programming

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

raster (version 1.9-55)

Geographic analysis and modeling with raster data

Description

Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package implements basic and high-level functions, as well as map algebra. Processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

125,710

Version

1.9-55

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

December 11th, 2011

Functions in raster (1.9-55)

cut

Convert values to classes
cluster

Use a multi-core cluster
bands

Number of bands
addLayer

Add or drop a layer
mosaic

Merge Raster* objects, using a function to compute cell value for overlapping areas.
Compare-methods

Compare Raster* objects
Math-methods

Mathematical functions
gridDistance

Grid distance
vector algebra

Algebra (notation) for manipulating SpatialPolygons*
Logic-methods

Logical operators and functions
clearValues

Clear values
extent

Extent
density

Density plot
as.data.frame

Get a data.frame with raster cell values
Arith-methods

Arithmetic with Raster* objects
origin

Origin
extension

Filename extensions
filename

Filename
adjacency

Pairs of adjacent cells
rotated

Do the raster cells have a rotation?
movingFun

Moving functions
approxNA

Estimate values for cells that are NA
cellFrom

Get cell, row, or column number
aggregatesp

Aggregate polygons
cellsFromExtent

Cells from Extent
Programming

Helper functions for programming
brick

Create a RasterBrick object
Raster-class

Raster* classes
validCell

Validity of a cell, column or row number
atan2

Two argument arc-tangent
compare

Compare
as.matrix

Get a matrix with raster cell values
drawExtent

Create an Extent object by drawing on a map
autocorrelation

Spatial autocorrelation
persp

Perspective plot
cellStats

Cell statistics
alignExtent

Align an extent (object of class Extent)
saverasterstack

Save or open a RasterStack file
count

Count
hillShade

Hill shading
Extract by index

Indexing to extract values of a Raster* object
as.logical

Change values to logical
area

Size of cells
Gain and offset

Gain and offset of values on file
freq

Frequency table
trim

Trim
Extent coordinates

Coordinates of the Extent of a Raster object
obsolete

Obsolete functions
rasterFromCells

Subset a raster by cell numbers
intersectExtent

Extent intersection
KML

Write a KML or KMZ file
plotRGB

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

Write raster data to a file
contour

Contour plot
terrain

Terrain characteristics
distance

Distance
datasource

Are values in memory and/or on disk?
distanceFromPoints

Distance from points
crosstab

Cross-tabulate
projectRaster

Project a Raster object
click

Click on a map
interpolate

Interpolate
rasterToPoints

Raster to points conversion
cv

Coefficient of variation
direction

Direction
dataType

Data type
unstack

Unstack
dim

Dimensions of a Raster* object
getValues

Get raster cell values
draw

Draw a line or polygon
z-values

Get or set z-values
initialize

Intitialize
extremeValues

Minimum and maximum values
rasterToPolygons

Raster to polygons conversion
properties

Raster file properties
stackSelect

Select cell values from a multi-layer Raster* object
Options

Global options for the raster package
disaggregate

Disaggregate
flip

Flip
writeFormats

File types for writing
aggregate

Aggregate cells
zoom

Zoom in on a plot
mergesp2

Spatially merge Spatial* objects
blockSize

Block size for writing files
mergesp1

Merge a Spatial* object with a data.frame
calc

Calculate
head

Show the head or tail of a Raster* object
extract

Extract values from Raster objects
filledContour

Filled contour plot
scalebar

scalebar
expand

Expand
as.raster

Coerce to a 'raster' object
getValuesBlock

Get a block of raster cell values
isLonLat

Is this longitude/latitude data?
mask

Mask values in a Raster object
resample

Resample a Raster object
predict

Spatial model predictions
shift

Shift
getData

Get geographic data
image

Image
reclass

Reclassify
Summary

Summary
merge

Merge
match

Value matching for Raster* objects
factors

Factors
rectify

rectify a Raster object
polygonFromExtent

Polygon from Extent
raster

Create a RasterLayer object
focal

Focal values
writeValues

Write values to a file
plot

Plot a Raster* object
ncell

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

Create a RasterLayer from x, y, z values
quantile

Raster quantiles
raster-package

An overview of the functions in this package
projection

Get or set a projection
nlayers

Number of layers
overlay

Overlay Raster objects
setExtent

Set the extent of a RasteLayer
substitute

Substitute values in a RasterLayer
rotate

Rotate
pointDistance

Distance between points
nudgeExtent

Round extent coordinates
stack

Create a RasterStack object
resolution

Resolution
xyFromCell

Coordinates from a row, column or cell number
subset

Subset layers in a Raster* object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
SampleInt

Sample integer values
rasterize

Rasterize points, lines, or polygons
Slope and aspect

Slope and aspect
hist

Histogram
setValues

Set values of a Raster object
sampleRandom

Random sample
round

Integer values
transpose

Transpose
clump

Detect clumps
NAvalue

Set the NA value of a RasterLayer
replacement

Replace cell values of a Raster* object
hdr

Header files
readAll

Read values from disk
update

Update raster cells of files (on disk)
unique

Unique values
sampleRegular

Regular sample
zApply

z (time) apply
setMinMax

Compute min and max values
unionExtent

Extent union
pairs

Pairs plot (matrix of scatterplots)
inifile

Read a .ini file
Extent-class

Class "Extent"
adjacent

Adjacent cells
cover

Replace NA values with values of other layers
modal

modal value
rasterTmpFile

Temporary files
rowFromCell

Row or column number from a cell number
which

Which cells are TRUE?
Summary-methods

Summary methods
boxplot

Box plot of Raster objects
crop

Crop
edge

Edge detection
rasterToContour

Raster to contour lines conversion
spplot

Use spplot to plot a Raster* object
zonal

Zonal statistics