Learn R Programming

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

raster (version 1.9-13)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 16th, 2011

Functions in raster (1.9-13)

crosstab

Cross-tabulate
calc

Calculate
aggregate

Aggregate cells
extent

Extent
Logic-methods

Logical operators and functions
Programming

Helper functions for programming
as.matrix

Get a matrix with raster cell values
Summary-methods

Summary methods
Raster-class

Raster* classes
compare

Compare
cut

Convert values to classes
quantile

Raster quantiles
count

Count
extension

Filename extensions
ncell

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

Write a KML or KMZ file
Options

Global options for the raster package
Compare-methods

Compare Raster* objects
plotRGB

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

Get geographic data
getValuesBlock

Get a block of raster cell values
persp

Perspective plot
Arith-methods

Arithmic with Raster* objects
dataType

Data type
raster-package

An overview of the functions in this package
Extent-class

Class "Extent"
writeValues

Write values to a file
area

Size of cells
plot

Plot a Raster* object
cover

Replace NA values with values of other layers
update

Update raster cells of files (on disk)
stack

Create a RasterStack object
intersectExtent

Extent intersection
hdr

Header files
dim

Dimensions of a Raster* object
brick

Create a RasterBrick object
setExtent

Set the extent of a RasteLayer
projectRaster

Project a Raster object
rotated

Do the raster cells have a rotation?
trim

Trim
adjacency

Adjacency
draw

Draw a line or polygon
substitute

Substitute values in a RasterLayer
image

Image
rasterToPoints

Raster to points conversion
rowFromCell

Row or column number from a cell number
nlayers

Number of layers
z-values

Get or set z-values
movingFun

Moving functions
disaggregate

Disaggregate
as.data.frame

Get a data.frame with raster cell values
setValues

Set values of a Raster object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
cellFrom

Get cell, row, or column number
focalFilter

Focal filter
focal

Focal
origin

Origin
clump

Detect clumps
cellsFromExtent

Cells from Extent
filename

Filename
extract

Extract values from Raster objects
edge

Edge detection
getValues

Get raster cell values
click

Click on a map
as.logical

Change values to logical
freq

Frequency table
as.raster

Coerce to a 'raster' object
head

Show the head or tail of a Raster* object
crop

Crop
rotate

Rotate
bands

Number of bands
readAll

Read values from disk
cellStats

Cell statistics
projection

Get or set a projection
SampleInt

Sample integer values
extremeValues

Minimum and maximum values
blockSize

Block size for writing files
Math-methods

Mathematical functions
addLayer

Add or drop a layer
drawExtent

Create an Extent object by drawing on a map
rasterize

Rasterize points, lines, or polygons
writeRaster

Write raster data to a file
boxplot

Box plot of Raster objects
Extent coordinates

Coordinates of the Extent of a Raster object
replacement

Replace cell values of a Raster* object
filledContour

Filled contour plot
Gain and offset

Gain and offset of values on file
properties

Raster file properties
Extract by index

Indexing to extract values of a Raster* object
direction

Direction
density

Density plot
atan2

Two argument arc-tangent
Cluster

Use a multi-core (snow) cluster
validCell

Validity of a cell, column or row number
distance

Distance
rasterFromCells

Subset a raster by cell numbers
clearValues

Clear values
hillShade

Hill shading
transpose

Transpose
datasource

Are values in memory and/or on disk?
gridDistance

Grid distance
round

Integer values
pairs

Pairs plot (matrix of scatterplots)
pointDistance

Distance between points
factors

Factors
setMinMax

Compute min and max values
overlay

Overlay Raster objects
reclass

Reclassify
alignExtent

Align an extent (object of class Extent)
zApply

z (time) apply
flip

Flip
merge

Merge RasterLayers
expand

Expand
obsolete

Obsolete functions
mosaic

Merge RasterLayers using a function for overlapping areas
unstack

Unstack
resample

Resample a Raster object
raster

Create a RasterLayer object
predict

Spatial model predictions
sampleRegular

Regular sample
rasterToContour

Raster to contour lines conversion
subset

Subset layers in a Raster* object
resolution

Resolution
stackSelect

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

rectify a Raster object
unique

Unique values
rasterToPolygons

Raster to polygons conversion
misc stats

Miscellaneous statistical functions
which

Which cells are TRUE?
contour

Contour plot
xyFromCell

Coordinates from a row, column or cell number
inifile

Read a .ini file
spplot

Use spplot to plot a Raster* object
rasterizeObsolete

Obsolete
saverasterstack

Save or open a RasterStack file
shift

Shift
hist

Histogram
Slope and aspect

Slope and aspect
autocorrelation

Spatial autocorrelation
interpolate

Interpolate
isLonLat

Is this longitude/latitude data?
initialize

Intitialize
zoom

Zoom in on a plot
nudgeExtent

Round extent coordinates
zonal

Zonal statistics
sampleRandom

Random sample
unionExtent

Extent union
mask

Mask values in a Raster object
distanceFromPoints

Distance from points
rasterFromXYZ

Create a RasterLayer from x, y, z values
rasterTmpFile

Temporary files
polygonFromExtent

Polygon from Extent
Summary

Summary
scalebar

scalebar
NAvalue

Set the NA value of a RasterLayer
writeFormats

File types for writing