Learn R Programming

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

raster (version 1.9-70)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

February 27th, 2012

Functions in raster (1.9-70)

draw

Draw a line or polygon
getData

Get geographic data
Raster-class

Raster* classes
autocorrelation

Spatial autocorrelation
extract

Extract values from Raster objects
crop

Crop
Summary-methods

Summary methods
addLayer

Add or drop a layer
as.raster

Coerce to a 'raster' object
as.matrix

Get a matrix with raster cell values
Math-methods

Mathematical functions
unionExtent

Extent union
movingFun

Moving functions
density

Density plot
Arith-methods

Arithmetic with Raster* objects
Extent-class

Class "Extent"
rotated

Do the raster cells have a rotation?
image

Image
Programming

Helper functions for programming
modal

modal value
cellsFromExtent

Cells from Extent
datasource

Are values in memory and/or on disk?
overlay

Overlay Raster objects
cv

Coefficient of variation
count

Count
hillShade

Hill shading
adjacency

Pairs of adjacent cells
Options

Global options for the raster package
as.data.frame

Get a data.frame with raster cell values
Extent coordinates

Coordinates of the Extent of a Raster object
aggregate

Aggregate cells
extent

Extent
rasterTmpFile

Temporary files
adjacent

Adjacent cells
area

Size of cells
getValues

Get raster cell values
origin

Origin
drawExtent

Create an Extent object by drawing on a map
cover

Replace NA values with values of other layers
setValues

Set values of a Raster object
focal

Focal values
filename

Filename
isLonLat

Is this longitude/latitude data?
dataType

Data type
rasterize

Rasterize points, lines, or polygons
buffer

buffer
clump

Detect clumps
trim

Trim
distance

Distance
blockSize

Block size for writing files
filledContour

Filled contour plot
persp

Perspective plot
intersect

Intersect Extent
Logic-methods

Logical operators and functions
compare

Compare
alignExtent

Align an extent (object of class Extent)
stackSelect

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

Cross-tabulate
edge

Edge detection
factors

Factors
approxNA

Estimate values for cells that are NA
hdr

Header files
plot

Plot a Raster* object
round

Integer values
inifile

Read a .ini file
unstack

Unstack
projection

Get or set a projection
Extent math

round Extent coordinates
dim

Dimensions of a Raster* object
calc

Calculate
stack

Create a RasterStack object
xyFromCell

Coordinates from a row, column or cell number
click

Click on a map
sampleRandom

Random sample
reclass

Reclassify
contour

Contour plot
saverasterstack

Save or open a RasterStack file
readAll

Read values from disk
plotRGB

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

Show the head or tail of a Raster* object
setMinMax

Compute min and max values
bands

Number of bands
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
distanceFromPoints

Distance from points
extremeValues

Minimum and maximum values
NAvalue

Set the NA value of a RasterLayer
quantile

Raster quantiles
transpose

Transpose
Summary

Summary
mask

Mask values in a Raster object
replacement

Replace cell values of a Raster* object
zoom

Zoom in on a plot
subset

Subset layers in a Raster* object
pairs

Pairs plot (matrix of scatterplots)
ncell

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

Terrain characteristics
scalebar

scalebar
Compare-methods

Compare Raster* objects
setExtent

Set the extent of a RasteLayer
rasterFromXYZ

Create a RasterLayer from x, y, z values
rasterToPolygons

Raster to polygons conversion
gridDistance

Grid distance
zonal

Zonal statistics
Gain and offset

Gain and offset of values on file
writeValues

Write values to a file
intersectExtent

Extent intersection
interpolate

Interpolate
update

Update raster cells of files (on disk)
rotate

Rotate
resample

Resample a Raster object
hist

Histogram
sampleRegular

Regular sample
resolution

Resolution
getValuesBlock

Get a block of raster cell values
match

Value matching for Raster* objects
boxplot

Box plot of Raster objects
spplot

Use spplot to plot a Raster* object
writeFormats

File types for writing
initialize

Intitialize
shift

Shift
disaggregate

Disaggregate
z-values

Get or set z-values
cellFrom

Get cell, row, or column number
unique

Unique values
rectify

rectify a Raster object
union

Union Extent
which

Which cells are TRUE?
freq

Frequency table
Slope and aspect

Slope and aspect
brick

Create a RasterBrick object
rasterToPoints

Raster to points conversion
rowFromCell

Row or column number from a cell number
KML

Write a KML or KMZ file
rasterFromCells

Subset a raster by cell numbers
writeRaster

Write raster data to a file
properties

Raster file properties
cluster

Use a multi-core cluster
nlayers

Number of layers
expand

Expand
rasterToContour

Raster to contour lines conversion
merge

Merge
zApply

z (time) apply
projectRaster

Project a Raster object
substitute

Substitute values in a RasterLayer
extension

Filename extensions
as.logical

Change values to logical
obsolete

Obsolete functions
SampleInt

Sample integer values
raster

Create a RasterLayer object
atan2

Two argument arc-tangent
cellStats

Cell statistics
direction

Direction
cut

Convert values to classes
clearValues

Clear values
flip

Flip
mosaic

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

Spatial model predictions
raster-package

An overview of the functions in this package
Extract by index

Indexing to extract values of a Raster* object
validCell

Validity of a cell, column or row number
pointDistance

Distance between points