Learn R Programming

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

raster (version 1.8-38)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 18th, 2011

Functions in raster (1.8-38)

head

Show the head or tail of a Raster* object
boxplot

Box plot of Raster objects
click

Click on a map
Summary-methods

Summary methods
Logic-methods

Logical operators and functions
alignExtent

Align an extent (object of class Extent)
pointDistance

Distance between points
calc

Calculate
factors

Factors
autocorrelation

Spatial autocorrelation
focal

Focal
Raster-class

Raster* classes
Extent-class

Class "Extent"
datasource

Are values in memory and/or on disk?
hist

Histogram
cellFrom

Get cell, row, or column number
draw

Draw a line or polygon
validCell

Validity of a cell, column or row number
compare

Compare
freq

Frequency table
mosaic

Merge RasterLayers using a function for overlapping areas
Math-methods

Mathematical functions
adjacency

Adjacency
isLonLat

Is this longitude/latitude data?
expand

Expand
cover

Replace NA values with values of other layers
count

Count
predict

Spatial model predictions
properties

Raster file properties
Gain and offset

Gain and offset of values on file
projectRaster

Project a Raster object
cellValues

Obsolete functions
filledContour

Filled contour plot
inifile

Read a .ini file
hdr

Header files
zoom

Zoom in on a plot
crosstab

Cross-tabulate
z-values

Get or set z-values
dataType

Data type
cellsFromExtent

Cells from Extent
interpolate

Interpolate
projection

Get or set a projection
Compare-methods

Compare Raster* objects
cut

Convert values to classes
polygonFromExtent

Polygon from Extent
clearValues

Clear values
getData

Get geographic data
density

Density plot
zApply

z (time) apply
drawExtent

Create an Extent object by drawing on a map
round

Integer values
getValuesBlock

Get a block of raster cell values
distanceFromPoints

Distance from points
direction

Direction
plotRGB

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

Merge RasterLayers
persp

Perspective plot
Arith-methods

Arithmic with Raster* objects
intersectExtent

Extent intersection
unionExtent

Extent union
spplot

Use spplot or ggplot to plot a Raster* object
nudgeExtent

Round extent coordinates
focalFilter

Focal filter
hillShade

Hill shading
as.matrix

Get a matrix with raster cell values
rotate

Rotate
unstack

Unstack
xyFromCell

Coordinates from a row, column or cell number
sampleRandom

Random sample
overlay

Overlay Raster objects
cellStats

Cell statistics
KML

Write a KML or KMZ file
blockSize

Block size for writing files
obsolete

Obsolete functions
Programming

Helper functions for programming
stack

Create a RasterStack object
rectify

rectify a Raster object
mask

Mask values in a Raster object
disaggregate

Disaggregate
rasterFromXYZ

Create a RasterLayer from x, y, z values
area

Size of cells
SampleInt

Sample integer values
extremeValues

Minimum and maximum values
contour

Contour plot
sampleRegular

Regular sample
clump

Detect clumps
extract

Extract values from Raster objects
unique

Unique values
nlayers

Number of layers
extension

Filename extensions
rasterToPoints

Raster to points conversion
rasterToPolygons

Raster to polygons conversion
bands

Number of bands
filename

Filename
raster

Create a RasterLayer object
as.logical

Change values to logical
rasterFromCells

Subset a raster by cell numbers
shift

Shift
extent

Extent
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
gridDistance

Grid distance
ncell

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

Read values from disk
dim

Dimensions of a Raster* object
reclass

Reclassify
writeFormats

File types for writing
zonal

Zonal statistics
getValues

Get raster cell values
setMinMax

Compute min and max values
resolution

Resolution
subset

Subset layers in a Raster* object
origin

Origin
transpose

Transpose
setExtent

Set the extent of a RasteLayer
initialize

Intitialize
saverasterstack

Save or open a RasterStack file
which

Which cells are TRUE?
plot

Plot a Raster* object
rotated

Do the raster cells have a rotation?
atan2

Two argument arc-tangent
movingFun

Moving functions
crop

Crop
edge

Edge detection
raster-package

An overview of the functions in this package
addLayer

Add or drop a layer
rowFromCell

Row or column number from a cell number
Options

Global options for the raster package
trim

Trim
quantile

Raster quantiles
misc stats

Miscellaneous statistical functions
image

Image
plot3D

Interactive 3D plot of a RasterLayer
Summary

Summary
flip

Flip
substitute

Substitute values in a RasterLayer
stackSelect

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

Set values of a Raster object
brick

Create a RasterBrick object
update

Update raster cells of files (on disk)
NAvalue

Set the NA value of a RasterLayer
Cluster

Use a multi-core (snow) cluster
replacement

Extract or replace cell values of a Raster object
Extent coordinates

Coordinates of the Extent of a Raster object
resample

Resample a Raster object
rasterizeObsolete

Obsolete
distance

Distance
pairs

Pairs plot (matrix of scatterplots)
Slope and aspect

Slope and aspect
rasterize

Rasterize points, lines, or polygons
rasterTmpFile

Temporary files
rasterToContour

Raster to contour lines conversion
writeRaster

Write raster data to a file
writeValues

Write values to a file
aggregate

Aggregate cells