Learn R Programming

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

raster (version 1.8-39)

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.8-39

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

July 5th, 2011

Functions in raster (1.8-39)

contour

Contour plot
compare

Compare
cellStats

Cell statistics
clearValues

Clear values
boxplot

Box plot of Raster objects
Extent coordinates

Coordinates of the Extent of a Raster object
movingFun

Moving functions
density

Density plot
Extent-class

Class "Extent"
cover

Replace NA values with values of other layers
Raster-class

Raster* classes
adjacency

Adjacency
gridDistance

Grid distance
cut

Convert values to classes
click

Click on a map
freq

Frequency table
Summary-methods

Summary methods
Programming

Helper functions for programming
reclass

Reclassify
pointDistance

Distance between points
Slope and aspect

Slope and aspect
draw

Draw a line or polygon
rasterizeObsolete

Obsolete
extension

Filename extensions
KML

Write a KML or KMZ file
rasterize

Rasterize points, lines, or polygons
extent

Extent
Compare-methods

Compare Raster* objects
extract

Extract values from Raster objects
drawExtent

Create an Extent object by drawing on a map
direction

Direction
Cluster

Use a multi-core (snow) cluster
getValues

Get raster cell values
plot

Plot a Raster* object
predict

Spatial model predictions
SampleInt

Sample integer values
Logic-methods

Logical operators and functions
rotate

Rotate
polygonFromExtent

Polygon from Extent
Math-methods

Mathematical functions
plotRGB

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

Two argument arc-tangent
crop

Crop
dim

Dimensions of a Raster* object
brick

Create a RasterBrick object
crosstab

Cross-tabulate
area

Size of cells
resample

Resample a Raster object
cellsFromExtent

Cells from Extent
raster-package

An overview of the functions in this package
mosaic

Merge RasterLayers using a function for overlapping areas
pairs

Pairs plot (matrix of scatterplots)
rasterFromXYZ

Create a RasterLayer from x, y, z values
extremeValues

Minimum and maximum values
as.matrix

Get a matrix with raster cell values
plot3D

Interactive 3D plot of a RasterLayer
cellValues

Obsolete functions
distanceFromPoints

Distance from points
properties

Raster file properties
disaggregate

Disaggregate
filledContour

Filled contour plot
getData

Get geographic data
stack

Create a RasterStack object
edge

Edge detection
factors

Factors
zoom

Zoom in on a plot
distance

Distance
focalFilter

Focal filter
Gain and offset

Gain and offset of values on file
bands

Number of bands
projectRaster

Project a Raster object
hist

Histogram
saverasterstack

Save or open a RasterStack file
intersectExtent

Extent intersection
inifile

Read a .ini file
writeValues

Write values to a file
persp

Perspective plot
setExtent

Set the extent of a RasteLayer
setValues

Set values of a Raster object
aggregate

Aggregate cells
hdr

Header files
writeRaster

Write raster data to a file
ncell

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

Summary
rowFromCell

Row or column number from a cell number
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
misc stats

Miscellaneous statistical functions
blockSize

Block size for writing files
raster

Create a RasterLayer object
obsolete

Obsolete functions
as.logical

Change values to logical
overlay

Overlay Raster objects
NAvalue

Set the NA value of a RasterLayer
Arith-methods

Arithmic with Raster* objects
alignExtent

Align an extent (object of class Extent)
getValuesBlock

Get a block of raster cell values
calc

Calculate
readAll

Read values from disk
rotated

Do the raster cells have a rotation?
sampleRandom

Random sample
writeFormats

File types for writing
count

Count
dataType

Data type
round

Integer values
flip

Flip
nlayers

Number of layers
addLayer

Add or drop a layer
sampleRegular

Regular sample
nudgeExtent

Round extent coordinates
substitute

Substitute values in a RasterLayer
replacement

Extract or replace cell values of a Raster object
clump

Detect clumps
projection

Get or set a projection
setMinMax

Compute min and max values
isLonLat

Is this longitude/latitude data?
autocorrelation

Spatial autocorrelation
resolution

Resolution
expand

Expand
filename

Filename
rectify

rectify a Raster object
focal

Focal
origin

Origin
trim

Trim
rasterToPoints

Raster to points conversion
rasterToPolygons

Raster to polygons conversion
rasterToContour

Raster to contour lines conversion
unique

Unique values
unstack

Unstack
Options

Global options for the raster package
spplot

Use spplot or ggplot to plot a Raster* object
cellFrom

Get cell, row, or column number
mask

Mask values in a Raster object
merge

Merge RasterLayers
head

Show the head or tail of a Raster* object
update

Update raster cells of files (on disk)
quantile

Raster quantiles
hillShade

Hill shading
interpolate

Interpolate
shift

Shift
z-values

Get or set z-values
unionExtent

Extent union
transpose

Transpose
stackSelect

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

z (time) apply
validCell

Validity of a cell, column or row number
rasterTmpFile

Temporary files
image

Image
rasterFromCells

Subset a raster by cell numbers
xyFromCell

Coordinates from a row, column or cell number
which

Which cells are TRUE?
datasource

Are values in memory and/or on disk?
subset

Subset layers in a Raster* object
initialize

Intitialize
zonal

Zonal statistics