Learn R Programming

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

raster (version 1.9-33)

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

119,565

Version

1.9-33

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 27th, 2011

Functions in raster (1.9-33)

adjacent

Adjacent cells
Arith-methods

Arithmic with Raster* objects
alignExtent

Align an extent (object of class Extent)
Extent-class

Class "Extent"
area

Size of cells
adjacency

Pairs of adjacent cells
KML

Write a KML or KMZ file
cellsFromExtent

Cells from Extent
addLayer

Add or drop a layer
click

Click on a map
direction

Direction
atan2

Two argument arc-tangent
brick

Create a RasterBrick object
movingFun

Moving functions
density

Density plot
freq

Frequency table
count

Count
compare

Compare
dim

Dimensions of a Raster* object
as.data.frame

Get a data.frame with raster cell values
cut

Convert values to classes
extremeValues

Minimum and maximum values
stackSelect

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

Intitialize
boxplot

Box plot of Raster objects
Extent coordinates

Coordinates of the Extent of a Raster object
getData

Get geographic data
hist

Histogram
dataType

Data type
Summary-methods

Summary methods
plotRGB

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

Rotate
flip

Flip
contour

Contour plot
bands

Number of bands
drawExtent

Create an Extent object by drawing on a map
draw

Draw a line or polygon
mosaic

Merge RasterLayers using a function for overlapping areas
cluster

Use a multi-core (snow) cluster
filename

Filename
distanceFromPoints

Distance from points
image

Image
Summary

Summary
interpolate

Interpolate
getValuesBlock

Get a block of raster cell values
subset

Subset layers in a Raster* object
focal_old

Focal (old functions)
ncell

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

Pairs plot (matrix of scatterplots)
obsolete

Obsolete functions
rowFromCell

Row or column number from a cell number
update

Update raster cells of files (on disk)
pointDistance

Distance between points
shift

Shift
datasource

Are values in memory and/or on disk?
expand

Expand
round

Integer values
validCell

Validity of a cell, column or row number
Compare-methods

Compare Raster* objects
readAll

Read values from disk
Math-methods

Mathematical functions
rasterToPolygons

Raster to polygons conversion
misc stats

Miscellaneous statistical functions
extent

Extent
Gain and offset

Gain and offset of values on file
persp

Perspective plot
getValues

Get raster cell values
predict

Spatial model predictions
nudgeExtent

Round extent coordinates
resample

Resample a Raster object
stack

Create a RasterStack object
sampleRandom

Random sample
writeRaster

Write raster data to a file
Raster-class

Raster* classes
as.raster

Coerce to a 'raster' object
Options

Global options for the raster package
overlay

Overlay Raster objects
unique

Unique values
trim

Trim
as.matrix

Get a matrix with raster cell values
writeValues

Write values to a file
Programming

Helper functions for programming
plot

Plot a Raster* object
xyFromCell

Coordinates from a row, column or cell number
hdr

Header files
properties

Raster file properties
projectRaster

Project a Raster object
as.logical

Change values to logical
raster-package

An overview of the functions in this package
cellFrom

Get cell, row, or column number
cellStats

Cell statistics
rasterTmpFile

Temporary files
writeFormats

File types for writing
nlayers

Number of layers
rasterFromXYZ

Create a RasterLayer from x, y, z values
extension

Filename extensions
rasterize

Rasterize points, lines, or polygons
focalFilter

Focal filter
projection

Get or set a projection
rasterFromCells

Subset a raster by cell numbers
inifile

Read a .ini file
hillShade

Hill shading
origin

Origin
crop

Crop
saverasterstack

Save or open a RasterStack file
Extract by index

Indexing to extract values of a Raster* object
filledContour

Filled contour plot
clump

Detect clumps
factors

Factors
blockSize

Block size for writing files
cover

Replace NA values with values of other layers
unstack

Unstack
distance

Distance
crosstab

Cross-tabulate
rasterToPoints

Raster to points conversion
calc

Calculate
reclass

Reclassify
rotated

Do the raster cells have a rotation?
intersectExtent

Extent intersection
polygonFromExtent

Polygon from Extent
zApply

z (time) apply
isLonLat

Is this longitude/latitude data?
zonal

Zonal statistics
disaggregate

Disaggregate
SampleInt

Sample integer values
merge

Merge
rasterToContour

Raster to contour lines conversion
raster

Create a RasterLayer object
resolution

Resolution
sampleRegular

Regular sample
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
scalebar

scalebar
which

Which cells are TRUE?
spplot

Use spplot to plot a Raster* object
terrain

Terrain characteristics
clearValues

Clear values
edge

Edge detection
focal

Focal values
gridDistance

Grid distance
autocorrelation

Spatial autocorrelation
extract

Extract values from Raster objects
mask

Mask values in a Raster object
substitute

Substitute values in a RasterLayer
replacement

Replace cell values of a Raster* object
rectify

rectify a Raster object
transpose

Transpose
setMinMax

Compute min and max values
NAvalue

Set the NA value of a RasterLayer
setExtent

Set the extent of a RasteLayer
Slope and aspect

Slope and aspect
head

Show the head or tail of a Raster* object
Logic-methods

Logical operators and functions
aggregate

Aggregate cells
quantile

Raster quantiles
setValues

Set values of a Raster object
unionExtent

Extent union
zoom

Zoom in on a plot
z-values

Get or set z-values