Learn R Programming

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

raster (version 1.8-35)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 15th, 2011

Functions in raster (1.8-35)

as.matrix

Get a matrix with raster cell values
Arith-methods

Arithmic with Raster* objects
calc

Calculate
cut

Convert values to classes
area

Size of cells
getValuesBlock

Get a block of raster cell values
clearValues

Clear values
Extent coordinates

Coordinates of the Extent of a Raster object
Logic-methods

Logical operators and functions
direction

Direction
extremeValues

Minimum and maximum values
filledContour

Filled contour plot
nlayers

Number of layers
cellStats

Cell statistics
atan2

Two argument arc-tangent
predict

Spatial model predictions
blockSize

Block size for writing files
extension

Filename extensions
plot

Plot a Raster* object
contour

Contour plot
Compare-methods

Compare Raster* objects
pointDistance

Distance between points
cover

Replace NA values with values of other layers
dataType

Data type
Slope and aspect

Slope and aspect
addLayer

Add or drop a layer
Cluster

Use a multi-core (snow) cluster
stackSelect

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

Get geographic data
draw

Draw a line or polygon
KML

Write a KML or KMZ file
origin

Origin
crosstab

Cross-tabulate
initialize

Intitialize
extract

Extract values from Raster objects
isLonLat

Is this longitude/latitude data?
gridDistance

Grid distance
head

Show the head or tail of a Raster* object
unionExtent

Extent union
as.logical

Change values to logical
rasterize

Rasterize points, lines, or polygons
Gain and offset

Gain and offset of values on file
Math-methods

Mathematical functions
edge

Edge detection
rasterToPoints

Raster to points conversion
hdr

Header files
rasterFromCells

Subset a raster by cell numbers
hillShade

Hill shading
validCell

Validity of a cell, column or row number
Options

Global options for the raster package
quantile

Raster quantiles
plot3D

Interactive 3D plot of a RasterLayer
alignExtent

Align an extent (object of class Extent)
click

Click on a map
inifile

Read a .ini file
movingFun

Moving functions
drawExtent

Create an Extent object by drawing on a map
bands

Number of bands
cellFrom

Get cell, row, or column number
count

Count
boxplot

Box plot of Raster objects
sampleRandom

Random sample
cellsFromExtent

Cells from Extent
polygonFromExtent

Polygon from Extent
datasource

Are values in memory and/or on disk?
compare

Compare
rotate

Rotate
image

Image
Raster-class

Raster* classes
flip

Flip
shift

Shift
readAll

Read values from disk
nudgeExtent

Round extent coordinates
round

Integer values
writeFormats

File types for writing
brick

Create a RasterBrick object
disaggregate

Disaggregate
unstack

Unstack
setMinMax

Compute min and max values
replacement

Extract or replace cell values of a Raster object
mask

Mask values in a Raster object
subset

Subset layers in a Raster* object
reclass

Reclassify
focalFilter

Focal filter
resolution

Resolution
overlay

Overlay Raster objects
setExtent

Set the extent of a RasteLayer
persp

Perspective plot
rasterTmpFile

Temporary files
writeValues

Write values to a file
hist

Histogram
saverasterstack

Save or open a RasterStack file
stack

Create a RasterStack object
aggregate

Aggregate cells
zoom

Zoom in on a plot
projectRaster

Project a Raster object
writeRaster

Write raster data to a file
clump

Detect clumps
intersectExtent

Extent intersection
rectify

rectify a Raster object
SampleInt

Sample integer values
filename

Filename
update

Update raster cells of files (on disk)
properties

Raster file properties
Extent-class

Class "Extent"
distanceFromPoints

Distance from points
adjacency

Adjacency
unique

Unique values
trim

Trim
factors

Factors
pairs

Pairs plot (matrix of scatterplots)
density

Density plot
Programming

Helper functions for programming
mosaic

Merge RasterLayers using a function for overlapping areas
extent

Extent
expand

Expand
raster-package

An overview of the functions in this package
substitute

Substitute values in a RasterLayer
rotated

Do the raster cells have a rotation?
setValues

Set values of a Raster object
ncell

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

Summary
zonal

Zonal statistics
focal

Focal
freq

Frequency table
which

Which cells are TRUE?
obsolete

Obsolete functions
resample

Resample a Raster object
rasterFromXYZ

Create a RasterLayer from x, y, z values
misc stats

Miscellaneous statistical functions
getValues

Get raster cell values
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
NAvalue

Set the NA value of a RasterLayer
rasterToPolygons

Raster to polygons conversion
xyFromCell

Coordinates from a row, column or cell number
Summary-methods

Summary methods
merge

Merge RasterLayers
autocorrelation

Spatial autocorrelation
plotRGB

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

Raster to contour lines conversion
cellValues

Obsolete functions
raster

Create a RasterLayer object
crop

Crop
dim

Dimensions of a Raster* object
interpolate

Interpolate
sampleRegular

Regular sample
rowFromCell

Row or column number from a cell number
projection

Get or set a projection
distance

Distance
transpose

Transpose
rasterizeObsolete

Obsolete
spplot

Use spplot or ggplot to plot a Raster* object
zApply

z (time) apply
z-values

Get or set z-values