Learn R Programming

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

raster (version 1.9-58)

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

153,616

Version

1.9-58

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

December 22nd, 2011

Functions in raster (1.9-58)

Raster-class

Raster* classes
click

Click on a map
blockSize

Block size for writing files
contour

Contour plot
cluster

Use a multi-core cluster
extremeValues

Minimum and maximum values
cellFrom

Get cell, row, or column number
alignExtent

Align an extent (object of class Extent)
aggregate

Aggregate cells
datasource

Are values in memory and/or on disk?
shift

Shift
vector algebra

Algebra (notation) for manipulating SpatialPolygons*
extent

Extent
focal

Focal values
atan2

Two argument arc-tangent
inifile

Read a .ini file
plotRGB

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

Helper functions for programming
hillShade

Hill shading
clearValues

Clear values
obsolete

Obsolete functions
flip

Flip
disaggregatesp

Disaggregate lines or polygons
quantile

Raster quantiles
writeRaster

Write raster data to a file
boxplot

Box plot of Raster objects
rotate

Rotate
calc

Calculate
adjacency

Pairs of adjacent cells
interpolate

Interpolate
hdr

Header files
expand

Expand
direction

Direction
setValues

Set values of a Raster object
cellsFromExtent

Cells from Extent
nudgeExtent

Round extent coordinates
SampleInt

Sample integer values
KML

Write a KML or KMZ file
bands

Number of bands
Gain and offset

Gain and offset of values on file
replacement

Replace cell values of a Raster* object
cut

Convert values to classes
as.data.frame

Get a data.frame with raster cell values
getValuesBlock

Get a block of raster cell values
density

Density plot
addLayer

Add or drop a layer
sampleRegular

Regular sample
area

Size of cells
intersectExtent

Extent intersection
Extent-class

Class "Extent"
reclass

Reclassify
match

Value matching for Raster* objects
rasterToPolygons

Raster to polygons conversion
resample

Resample a Raster object
cover

Replace NA values with values of other layers
Logic-methods

Logical operators and functions
count

Count
draw

Draw a line or polygon
subset

Subset layers in a Raster* object
writeValues

Write values to a file
extension

Filename extensions
rotated

Do the raster cells have a rotation?
disaggregate

Disaggregate
setMinMax

Compute min and max values
Arith-methods

Arithmetic with Raster* objects
writeFormats

File types for writing
rasterTmpFile

Temporary files
zApply

z (time) apply
as.logical

Change values to logical
spplot

Use spplot to plot a Raster* object
rasterize

Rasterize points, lines, or polygons
predict

Spatial model predictions
Summary

Summary
saverasterstack

Save or open a RasterStack file
as.matrix

Get a matrix with raster cell values
Compare-methods

Compare Raster* objects
projection

Get or set a projection
mergesp2

Spatially merge Spatial* objects
approxNA

Estimate values for cells that are NA
cellStats

Cell statistics
getValues

Get raster cell values
zonal

Zonal statistics
extract

Extract values from Raster objects
factors

Factors
zoom

Zoom in on a plot
dim

Dimensions of a Raster* object
sampleRandom

Random sample
unionExtent

Extent union
setExtent

Set the extent of a RasteLayer
head

Show the head or tail of a Raster* object
Extract by index

Indexing to extract values of a Raster* object
xyFromCell

Coordinates from a row, column or cell number
hist

Histogram
scalebar

scalebar
image

Image
freq

Frequency table
filledContour

Filled contour plot
filename

Filename
update

Update raster cells of files (on disk)
readAll

Read values from disk
select

Select features from Spatial objects
which

Which cells are TRUE?
stack

Create a RasterStack object
Extent coordinates

Coordinates of the Extent of a Raster object
getData

Get geographic data
trim

Trim
dataType

Data type
mosaic

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

Summary methods
distanceFromPoints

Distance from points
pairs

Pairs plot (matrix of scatterplots)
movingFun

Moving functions
raster

Create a RasterLayer object
nlayers

Number of layers
merge

Merge
raster-package

An overview of the functions in this package
properties

Raster file properties
gridDistance

Grid distance
rowFromCell

Row or column number from a cell number
rasterToContour

Raster to contour lines conversion
pointDistance

Distance between points
Slope and aspect

Slope and aspect
rasterFromCells

Subset a raster by cell numbers
unstack

Unstack
projectRaster

Project a Raster object
brick

Create a RasterBrick object
NAvalue

Set the NA value of a RasterLayer
isLonLat

Is this longitude/latitude data?
unique

Unique values
rasterToPoints

Raster to points conversion
round

Integer values
overlay

Overlay Raster objects
mask

Mask values in a Raster object
validCell

Validity of a cell, column or row number
rasterFromXYZ

Create a RasterLayer from x, y, z values
persp

Perspective plot
ncell

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

Distance
terrain

Terrain characteristics
origin

Origin
mergesp1

Merge a Spatial* object with a data.frame
stackSelect

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

Polygon from Extent
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
resolution

Resolution
initialize

Intitialize
substitute

Substitute values in a RasterLayer
Math-methods

Mathematical functions
modal

modal value
autocorrelation

Spatial autocorrelation
clump

Detect clumps
compare

Compare
plot

Plot a Raster* object
rectify

rectify a Raster object
transpose

Transpose
z-values

Get or set z-values
edge

Edge detection
aggregatesp

Aggregate polygons
adjacent

Adjacent cells
as.raster

Coerce to a 'raster' object
crosstab

Cross-tabulate
drawExtent

Create an Extent object by drawing on a map
cv

Coefficient of variation
crop

Crop
Options

Global options for the raster package