Learn R Programming

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

raster (version 1.9-67)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

February 7th, 2012

Functions in raster (1.9-67)

click

Click on a map
as.matrix

Get a matrix with raster cell values
bands

Number of bands
dataType

Data type
buffer

buffer
compare

Compare
direction

Direction
adjacency

Pairs of adjacent cells
boxplot

Box plot of Raster objects
count

Count
Extent coordinates

Coordinates of the Extent of a Raster object
crop

Crop
atan2

Two argument arc-tangent
Extent-class

Class "Extent"
alignExtent

Align an extent (object of class Extent)
disaggregate

Disaggregate
calc

Calculate
Arith-methods

Arithmetic with Raster* objects
cluster

Use a multi-core cluster
Math-methods

Mathematical functions
rasterTmpFile

Temporary files
Logic-methods

Logical operators and functions
Compare-methods

Compare Raster* objects
brick

Create a RasterBrick object
edge

Edge detection
Programming

Helper functions for programming
Raster-class

Raster* classes
extension

Filename extensions
aggregate

Aggregate cells
Extract by index

Indexing to extract values of a Raster* object
flip

Flip
contour

Contour plot
match

Value matching for Raster* objects
datasource

Are values in memory and/or on disk?
mosaic

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

Zoom in on a plot
hillShade

Hill shading
hdr

Header files
initialize

Intitialize
getData

Get geographic data
cellsFromExtent

Cells from Extent
rasterFromXYZ

Create a RasterLayer from x, y, z values
nlayers

Number of layers
focal

Focal values
approxNA

Estimate values for cells that are NA
Summary-methods

Summary methods
distanceFromPoints

Distance from points
autocorrelation

Spatial autocorrelation
area

Size of cells
adjacent

Adjacent cells
freq

Frequency table
image

Image
cv

Coefficient of variation
as.logical

Change values to logical
modal

modal value
KML

Write a KML or KMZ file
as.data.frame

Get a data.frame with raster cell values
addLayer

Add or drop a layer
head

Show the head or tail of a Raster* object
crosstab

Cross-tabulate
polygonFromExtent

Polygon from Extent
rasterToPolygons

Raster to polygons conversion
inifile

Read a .ini file
zonal

Zonal statistics
filename

Filename
resample

Resample a Raster object
projection

Get or set a projection
filledContour

Filled contour plot
rasterFromCells

Subset a raster by cell numbers
hist

Histogram
setMinMax

Compute min and max values
dim

Dimensions of a Raster* object
extremeValues

Minimum and maximum values
plot

Plot a Raster* object
isLonLat

Is this longitude/latitude data?
union

Union Extent
cellStats

Cell statistics
density

Density plot
clump

Detect clumps
writeFormats

File types for writing
properties

Raster file properties
drawExtent

Create an Extent object by drawing on a map
update

Update raster cells of files (on disk)
interpolate

Interpolate
writeValues

Write values to a file
extent

Extent
intersectExtent

Extent intersection
cut

Convert values to classes
overlay

Overlay Raster objects
round

Integer values
rotated

Do the raster cells have a rotation?
unionExtent

Extent union
ncell

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

Create a RasterStack object
draw

Draw a line or polygon
distance

Distance
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
as.raster

Coerce to a 'raster' object
clearValues

Clear values
writeRaster

Write raster data to a file
setExtent

Set the extent of a RasteLayer
z-values

Get or set z-values
sampleRandom

Random sample
Options

Global options for the raster package
scalebar

scalebar
obsolete

Obsolete functions
rectify

rectify a Raster object
which

Which cells are TRUE?
replacement

Replace cell values of a Raster* object
saverasterstack

Save or open a RasterStack file
cover

Replace NA values with values of other layers
plotRGB

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

Origin
movingFun

Moving functions
stackSelect

Select cell values from a multi-layer Raster* object
Gain and offset

Gain and offset of values on file
intersect

Intersect Extent
merge

Merge
extract

Extract values from Raster objects
rasterToContour

Raster to contour lines conversion
subset

Subset layers in a Raster* object
NAvalue

Set the NA value of a RasterLayer
rotate

Rotate
terrain

Terrain characteristics
mask

Mask values in a Raster object
raster

Create a RasterLayer object
xyFromCell

Coordinates from a row, column or cell number
sampleRegular

Regular sample
spplot

Use spplot to plot a Raster* object
substitute

Substitute values in a RasterLayer
rasterToPoints

Raster to points conversion
rasterize

Rasterize points, lines, or polygons
pairs

Pairs plot (matrix of scatterplots)
validCell

Validity of a cell, column or row number
expand

Expand
persp

Perspective plot
Summary

Summary
readAll

Read values from disk
setValues

Set values of a Raster object
Slope and aspect

Slope and aspect
reclass

Reclassify
zApply

z (time) apply
resolution

Resolution
Extent math

round Extent coordinates
pointDistance

Distance between points
raster-package

An overview of the functions in this package
SampleInt

Sample integer values
transpose

Transpose
unstack

Unstack
unique

Unique values
shift

Shift
factors

Factors
gridDistance

Grid distance
rowFromCell

Row or column number from a cell number
blockSize

Block size for writing files
cellFrom

Get cell, row, or column number
getValues

Get raster cell values
getValuesBlock

Get a block of raster cell values
projectRaster

Project a Raster object
quantile

Raster quantiles
predict

Spatial model predictions
trim

Trim