Learn R Programming

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

raster (version 1.9-44)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

November 18th, 2011

Functions in raster (1.9-44)

aggregate

Aggregate cells
draw

Draw a line or polygon
Logic-methods

Logical operators and functions
clearValues

Clear values
density

Density plot
adjacency

Pairs of adjacent cells
extract

Extract values from Raster objects
cellsFromExtent

Cells from Extent
alignExtent

Align an extent (object of class Extent)
clump

Detect clumps
getData

Get geographic data
initialize

Intitialize
rasterToPolygons

Raster to polygons conversion
click

Click on a map
count

Count
ncell

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

Calculate
cover

Replace NA values with values of other layers
autocorrelation

Spatial autocorrelation
area

Size of cells
projectRaster

Project a Raster object
Options

Global options for the raster package
cluster

Use a multi-core cluster
nudgeExtent

Round extent coordinates
Extent-class

Class "Extent"
inifile

Read a .ini file
setValues

Set values of a Raster object
direction

Direction
edge

Edge detection
disaggregate

Disaggregate
distanceFromPoints

Distance from points
image

Image
origin

Origin
sampleRandom

Random sample
drawExtent

Create an Extent object by drawing on a map
boxplot

Box plot of Raster objects
as.logical

Change values to logical
datasource

Are values in memory and/or on disk?
extension

Filename extensions
adjacent

Adjacent cells
plotRGB

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

Regular sample
SampleInt

Sample integer values
resolution

Resolution
gridDistance

Grid distance
Arith-methods

Arithmic with Raster* objects
Math-methods

Mathematical functions
unstack

Unstack
rasterToPoints

Raster to points conversion
rasterToContour

Raster to contour lines conversion
rotated

Do the raster cells have a rotation?
reclass

Reclassify
rasterFromXYZ

Create a RasterLayer from x, y, z values
Extract by index

Indexing to extract values of a Raster* object
quantile

Raster quantiles
predict

Spatial model predictions
shift

Shift
validCell

Validity of a cell, column or row number
compare

Compare
properties

Raster file properties
trim

Trim
distance

Distance
zoom

Zoom in on a plot
polygonFromExtent

Polygon from Extent
plot

Plot a Raster* object
KML

Write a KML or KMZ file
freq

Frequency table
intersectExtent

Extent intersection
NAvalue

Set the NA value of a RasterLayer
getValues

Get raster cell values
interpolate

Interpolate
hdr

Header files
mask

Mask values in a Raster object
writeFormats

File types for writing
as.raster

Coerce to a 'raster' object
as.data.frame

Get a data.frame with raster cell values
as.matrix

Get a matrix with raster cell values
z-values

Get or set z-values
Programming

Helper functions for programming
Slope and aspect

Slope and aspect
stackSelect

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

Unique values
addLayer

Add or drop a layer
match

Value matching for Raster* objects
bands

Number of bands
blockSize

Block size for writing files
rowFromCell

Row or column number from a cell number
projection

Get or set a projection
atan2

Two argument arc-tangent
movingFun

Moving functions
persp

Perspective plot
mosaic

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

Cell statistics
Compare-methods

Compare Raster* objects
crosstab

Cross-tabulate
factors

Factors
obsolete

Obsolete functions
vectorAlgebra

Algebra (notation) with polygons
raster

Create a RasterLayer object
getValuesBlock

Get a block of raster cell values
merge

Merge
approxNA

Estimate values for cells that are NA
dim

Dimensions of a Raster* object
readAll

Read values from disk
replacement

Replace cell values of a Raster* object
isLonLat

Is this longitude/latitude data?
extent

Extent
contour

Contour plot
zApply

z (time) apply
saverasterstack

Save or open a RasterStack file
rotate

Rotate
focal

Focal values
nlayers

Number of layers
setExtent

Set the extent of a RasteLayer
writeValues

Write values to a file
raster-package

An overview of the functions in this package
hist

Histogram
subset

Subset layers in a Raster* object
stack

Create a RasterStack object
spplot

Use spplot to plot a Raster* object
rasterize

Rasterize points, lines, or polygons
transpose

Transpose
writeRaster

Write raster data to a file
Raster-class

Raster* classes
brick

Create a RasterBrick object
cellFrom

Get cell, row, or column number
crop

Crop
filledContour

Filled contour plot
Summary-methods

Summary methods
extremeValues

Minimum and maximum values
dataType

Data type
overlay

Overlay Raster objects
hillShade

Hill shading
rectify

rectify a Raster object
xyFromCell

Coordinates from a row, column or cell number
substitute

Substitute values in a RasterLayer
rasterFromCells

Subset a raster by cell numbers
Summary

Summary
round

Integer values
setMinMax

Compute min and max values
update

Update raster cells of files (on disk)
misc stats

Miscellaneous statistical functions
zonal

Zonal statistics
terrain

Terrain characteristics
unionExtent

Extent union
Extent coordinates

Coordinates of the Extent of a Raster object
expand

Expand
Gain and offset

Gain and offset of values on file
flip

Flip
rasterTmpFile

Temporary files
head

Show the head or tail of a Raster* object
resample

Resample a Raster object
cut

Convert values to classes
filename

Filename
pointDistance

Distance between points
scalebar

scalebar
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
pairs

Pairs plot (matrix of scatterplots)
which

Which cells are TRUE?