Learn R Programming

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

raster (version 1.9-54)

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

154,521

Version

1.9-54

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

December 7th, 2011

Functions in raster (1.9-54)

Extent coordinates

Coordinates of the Extent of a Raster object
hist

Histogram
adjacent

Adjacent cells
persp

Perspective plot
inifile

Read a .ini file
draw

Draw a line or polygon
alignExtent

Align an extent (object of class Extent)
hillShade

Hill shading
aggregate

Aggregate cells or polygons
distanceFromPoints

Distance from points
flip

Flip
adjacency

Pairs of adjacent cells
match

Value matching for Raster* objects
merge

Merge
approxNA

Estimate values for cells that are NA
as.raster

Coerce to a 'raster' object
rasterToContour

Raster to contour lines conversion
addLayer

Add or drop a layer
nlayers

Number of layers
isLonLat

Is this longitude/latitude data?
blockSize

Block size for writing files
initialize

Intitialize
freq

Frequency table
clump

Detect clumps
boxplot

Box plot of Raster objects
setMinMax

Compute min and max values
click

Click on a map
drawExtent

Create an Extent object by drawing on a map
setExtent

Set the extent of a RasteLayer
mergesp2

Spatially merge Spatial* objects
brick

Create a RasterBrick object
clearValues

Clear values
pointDistance

Distance between points
cv

Coefficient of variation
cellsFromExtent

Cells from Extent
obsolete

Obsolete functions
Compare-methods

Compare Raster* objects
Gain and offset

Gain and offset of values on file
getValuesBlock

Get a block of raster cell values
Options

Global options for the raster package
crosstab

Cross-tabulate
writeValues

Write values to a file
Arith-methods

Arithmetic with Raster* objects
interpolate

Interpolate
xyFromCell

Coordinates from a row, column or cell number
calc

Calculate
filledContour

Filled contour plot
autocorrelation

Spatial autocorrelation
as.matrix

Get a matrix with raster cell values
Programming

Helper functions for programming
round

Integer values
getData

Get geographic data
compare

Compare
datasource

Are values in memory and/or on disk?
as.logical

Change values to logical
mosaic

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

Use a multi-core cluster
intersectExtent

Extent intersection
which

Which cells are TRUE?
vector algebra

Algebra (notation) for overlaying SpatialPolygons*
cellStats

Cell statistics
direction

Direction
extent

Extent
plot

Plot a Raster* object
Summary-methods

Summary methods
Raster-class

Raster* classes
extension

Filename extensions
polygonFromExtent

Polygon from Extent
plotRGB

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

Spatial model predictions
SampleInt

Sample integer values
KML

Write a KML or KMZ file
as.data.frame

Get a data.frame with raster cell values
area

Size of cells
contour

Contour plot
atan2

Two argument arc-tangent
overlay

Overlay Raster objects
resample

Resample a Raster object
rotated

Do the raster cells have a rotation?
filename

Filename
edge

Edge detection
factors

Factors
raster-package

An overview of the functions in this package
zApply

z (time) apply
expand

Expand
movingFun

Moving functions
disaggregate

Disaggregate
bands

Number of bands
raster

Create a RasterLayer object
Slope and aspect

Slope and aspect
reclass

Reclassify
head

Show the head or tail of a Raster* object
ncell

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

Regular sample
rasterToPoints

Raster to points conversion
extremeValues

Minimum and maximum values
writeFormats

File types for writing
trim

Trim
resolution

Resolution
rowFromCell

Row or column number from a cell number
mask

Mask values in a Raster object
shift

Shift
properties

Raster file properties
zonal

Zonal statistics
subset

Subset layers in a Raster* object
mergesp1

Merge a Spatial* object with a data.frame
terrain

Terrain characteristics
quantile

Raster quantiles
getValues

Get raster cell values
Extent-class

Class "Extent"
stackSelect

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

Project a Raster object
scalebar

scalebar
distance

Distance
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
sampleRandom

Random sample
density

Density plot
projection

Get or set a projection
modal

modal value
rectify

rectify a Raster object
setValues

Set values of a Raster object
gridDistance

Grid distance
validCell

Validity of a cell, column or row number
NAvalue

Set the NA value of a RasterLayer
Summary

Summary
dim

Dimensions of a Raster* object
pairs

Pairs plot (matrix of scatterplots)
cover

Replace NA values with values of other layers
unique

Unique values
origin

Origin
replacement

Replace cell values of a Raster* object
saverasterstack

Save or open a RasterStack file
unstack

Unstack
Math-methods

Mathematical functions
Extract by index

Indexing to extract values of a Raster* object
nudgeExtent

Round extent coordinates
rasterFromXYZ

Create a RasterLayer from x, y, z values
z-values

Get or set z-values
unionExtent

Extent union
substitute

Substitute values in a RasterLayer
rasterToPolygons

Raster to polygons conversion
zoom

Zoom in on a plot
crop

Crop
readAll

Read values from disk
image

Image
stack

Create a RasterStack object
Logic-methods

Logical operators and functions
writeRaster

Write raster data to a file
spplot

Use spplot to plot a Raster* object
transpose

Transpose
rasterFromCells

Subset a raster by cell numbers
hdr

Header files
dataType

Data type
rotate

Rotate
rasterize

Rasterize points, lines, or polygons
cellFrom

Get cell, row, or column number
cut

Convert values to classes
count

Count
focal

Focal values
extract

Extract values from Raster objects
rasterTmpFile

Temporary files
update

Update raster cells of files (on disk)