Learn R Programming

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

raster (version 1.9-19)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 23rd, 2011

Functions in raster (1.9-19)

as.raster

Coerce to a 'raster' object
projection

Get or set a projection
Gain and offset

Gain and offset of values on file
cluster

Use a multi-core (snow) cluster
getValuesBlock

Get a block of raster cell values
adjacent

Adjacent cells
Math-methods

Mathematical functions
Extent-class

Class "Extent"
Raster-class

Raster* classes
Compare-methods

Compare Raster* objects
intersectExtent

Extent intersection
Arith-methods

Arithmic with Raster* objects
datasource

Are values in memory and/or on disk?
Logic-methods

Logical operators and functions
cellStats

Cell statistics
calc

Calculate
merge

Merge RasterLayers
KML

Write a KML or KMZ file
edge

Edge detection
hdr

Header files
blockSize

Block size for writing files
movingFun

Moving functions
rasterFromCells

Subset a raster by cell numbers
Extent coordinates

Coordinates of the Extent of a Raster object
aggregate

Aggregate cells
substitute

Substitute values in a RasterLayer
draw

Draw a line or polygon
clearValues

Clear values
distanceFromPoints

Distance from points
area

Size of cells
compare

Compare
stackSelect

Select cell values from a multi-layer Raster* object
as.matrix

Get a matrix with raster cell values
expand

Expand
as.data.frame

Get a data.frame with raster cell values
autocorrelation

Spatial autocorrelation
freq

Frequency table
direction

Direction
dim

Dimensions of a Raster* object
filename

Filename
atan2

Two argument arc-tangent
inifile

Read a .ini file
focal

Focal
resample

Resample a Raster object
clump

Detect clumps
z-values

Get or set z-values
pairs

Pairs plot (matrix of scatterplots)
crop

Crop
unique

Unique values
head

Show the head or tail of a Raster* object
obsolete

Obsolete functions
isLonLat

Is this longitude/latitude data?
hist

Histogram
interpolate

Interpolate
rasterToPolygons

Raster to polygons conversion
contour

Contour plot
Extract by index

Indexing to extract values of a Raster* object
density

Density plot
dataType

Data type
shift

Shift
readAll

Read values from disk
brick

Create a RasterBrick object
replacement

Replace cell values of a Raster* object
predict

Spatial model predictions
properties

Raster file properties
origin

Origin
disaggregate

Disaggregate
mosaic

Merge RasterLayers using a function for overlapping areas
bands

Number of bands
hillShade

Hill shading
cellFrom

Get cell, row, or column number
mask

Mask values in a Raster object
cover

Replace NA values with values of other layers
nlayers

Number of layers
cellsFromExtent

Cells from Extent
extension

Filename extensions
count

Count
addLayer

Add or drop a layer
extremeValues

Minimum and maximum values
spplot

Use spplot to plot a Raster* object
scalebar

scalebar
cut

Convert values to classes
plot

Plot a Raster* object
reclass

Reclassify
rasterToContour

Raster to contour lines conversion
extent

Extent
sampleRegular

Regular sample
xyFromCell

Coordinates from a row, column or cell number
boxplot

Box plot of Raster objects
NAvalue

Set the NA value of a RasterLayer
crosstab

Cross-tabulate
persp

Perspective plot
rotated

Do the raster cells have a rotation?
which

Which cells are TRUE?
getData

Get geographic data
polygonFromExtent

Polygon from Extent
misc stats

Miscellaneous statistical functions
rectify

rectify a Raster object
setMinMax

Compute min and max values
distance

Distance
raster-package

An overview of the functions in this package
plotRGB

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

Create a RasterStack object
quantile

Raster quantiles
zonal

Zonal statistics
rasterize

Rasterize points, lines, or polygons
rowFromCell

Row or column number from a cell number
rasterTmpFile

Temporary files
setExtent

Set the extent of a RasteLayer
sampleRandom

Random sample
setValues

Set values of a Raster object
gridDistance

Grid distance
Summary

Summary
zApply

z (time) apply
update

Update raster cells of files (on disk)
click

Click on a map
getValues

Get raster cell values
filledContour

Filled contour plot
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unionExtent

Extent union
Options

Global options for the raster package
rotate

Rotate
SampleInt

Sample integer values
writeFormats

File types for writing
writeRaster

Write raster data to a file
resolution

Resolution
Slope and aspect

Slope and aspect
image

Image
overlay

Overlay Raster objects
rasterFromXYZ

Create a RasterLayer from x, y, z values
writeValues

Write values to a file
projectRaster

Project a Raster object
nudgeExtent

Round extent coordinates
zoom

Zoom in on a plot
alignExtent

Align an extent (object of class Extent)
validCell

Validity of a cell, column or row number
rasterizeObsolete

Obsolete
transpose

Transpose
subset

Subset layers in a Raster* object
as.logical

Change values to logical
adjacency

Pairs of adjacent cells
saverasterstack

Save or open a RasterStack file
extract

Extract values from Raster objects
Programming

Helper functions for programming
factors

Factors
ncell

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

Distance between points
round

Integer values
Summary-methods

Summary methods
drawExtent

Create an Extent object by drawing on a map
focalFilter

Focal filter
flip

Flip
initialize

Intitialize
raster

Create a RasterLayer object
rasterToPoints

Raster to points conversion
trim

Trim
unstack

Unstack