Learn R Programming

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

raster (version 1.9-64)

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

171,298

Version

1.9-64

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

January 17th, 2012

Functions in raster (1.9-64)

adjacency

Pairs of adjacent cells
datasource

Are values in memory and/or on disk?
cellFrom

Get cell, row, or column number
initialize

Intitialize
Math-methods

Mathematical functions
buffer

buffer
cellStats

Cell statistics
extent

Extent
as.matrix

Get a matrix with raster cell values
Extent coordinates

Coordinates of the Extent of a Raster object
image

Image
intersectExtent

Extent intersection
quantile

Raster quantiles
alignExtent

Align an extent (object of class Extent)
modal

modal value
dataType

Data type
as.data.frame

Get a data.frame with raster cell values
addLayer

Add or drop a layer
distance

Distance
draw

Draw a line or polygon
getData

Get geographic data
contour

Contour plot
hillShade

Hill shading
Summary-methods

Summary methods
Compare-methods

Compare Raster* objects
area

Size of cells
pointDistance

Distance between points
aggregate

Aggregate cells
extremeValues

Minimum and maximum values
SampleInt

Sample integer values
cluster

Use a multi-core cluster
setExtent

Set the extent of a RasteLayer
Gain and offset

Gain and offset of values on file
properties

Raster file properties
rasterize

Rasterize points, lines, or polygons
Raster-class

Raster* classes
gridDistance

Grid distance
direction

Direction
disaggregate

Disaggregate
cellsFromExtent

Cells from Extent
rotate

Rotate
cut

Convert values to classes
cover

Replace NA values with values of other layers
movingFun

Moving functions
adjacent

Adjacent cells
flip

Flip
Summary

Summary
zonal

Zonal statistics
reclass

Reclassify
as.raster

Coerce to a 'raster' object
cv

Coefficient of variation
Logic-methods

Logical operators and functions
calc

Calculate
filename

Filename
Options

Global options for the raster package
overlay

Overlay Raster objects
plot

Plot a Raster* object
clearValues

Clear values
setValues

Set values of a Raster object
KML

Write a KML or KMZ file
filledContour

Filled contour plot
rasterFromXYZ

Create a RasterLayer from x, y, z values
inifile

Read a .ini file
update

Update raster cells of files (on disk)
crosstab

Cross-tabulate
Extent-class

Class "Extent"
stack

Create a RasterStack object
click

Click on a map
approxNA

Estimate values for cells that are NA
freq

Frequency table
transpose

Transpose
predict

Spatial model predictions
crop

Crop
getValuesBlock

Get a block of raster cell values
head

Show the head or tail of a Raster* object
blockSize

Block size for writing files
factors

Factors
boxplot

Box plot of Raster objects
as.logical

Change values to logical
persp

Perspective plot
bands

Number of bands
autocorrelation

Spatial autocorrelation
terrain

Terrain characteristics
obsolete

Obsolete functions
focal

Focal values
drawExtent

Create an Extent object by drawing on a map
extension

Filename extensions
distanceFromPoints

Distance from points
expand

Expand
z-values

Get or set z-values
brick

Create a RasterBrick object
intersect

Intersect Extent
projectRaster

Project a Raster object
replacement

Replace cell values of a Raster* object
count

Count
match

Value matching for Raster* objects
trim

Trim
NAvalue

Set the NA value of a RasterLayer
rasterTmpFile

Temporary files
resolution

Resolution
mask

Mask values in a Raster object
rectify

rectify a Raster object
zApply

z (time) apply
sampleRegular

Regular sample
projection

Get or set a projection
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
getValues

Get raster cell values
interpolate

Interpolate
edge

Edge detection
origin

Origin
sampleRandom

Random sample
hist

Histogram
isLonLat

Is this longitude/latitude data?
writeRaster

Write raster data to a file
Programming

Helper functions for programming
clump

Detect clumps
mosaic

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

Merge
ncell

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

Shift
pairs

Pairs plot (matrix of scatterplots)
zoom

Zoom in on a plot
Slope and aspect

Slope and aspect
saverasterstack

Save or open a RasterStack file
rasterFromCells

Subset a raster by cell numbers
rotated

Do the raster cells have a rotation?
dim

Dimensions of a Raster* object
substitute

Substitute values in a RasterLayer
union

Union Extent
writeValues

Write values to a file
scalebar

scalebar
density

Density plot
resample

Resample a Raster object
unionExtent

Extent union
writeFormats

File types for writing
nlayers

Number of layers
raster-package

An overview of the functions in this package
rasterToPolygons

Raster to polygons conversion
rasterToContour

Raster to contour lines conversion
which

Which cells are TRUE?
xyFromCell

Coordinates from a row, column or cell number
rowFromCell

Row or column number from a cell number
unstack

Unstack
subset

Subset layers in a Raster* object
validCell

Validity of a cell, column or row number
round

Integer values
unique

Unique values
setMinMax

Compute min and max values
atan2

Two argument arc-tangent
rasterToPoints

Raster to points conversion
readAll

Read values from disk
Arith-methods

Arithmetic with Raster* objects
compare

Compare
Extract by index

Indexing to extract values of a Raster* object
hdr

Header files
polygonFromExtent

Polygon from Extent
raster

Create a RasterLayer object
plotRGB

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

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

Use spplot to plot a Raster* object
extract

Extract values from Raster objects
Extent math

round Extent coordinates