Learn R Programming

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

raster (version 1.9-11)

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

240,251

Version

1.9-11

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 13th, 2011

Functions in raster (1.9-11)

as.matrix

Get a matrix with raster cell values
atan2

Two argument arc-tangent
cut

Convert values to classes
intersectExtent

Extent intersection
extension

Filename extensions
as.raster

Coerce to a 'raster' object
adjacency

Adjacency
clearValues

Clear values
datasource

Are values in memory and/or on disk?
autocorrelation

Spatial autocorrelation
Extent coordinates

Coordinates of the Extent of a Raster object
crosstab

Cross-tabulate
Compare-methods

Compare Raster* objects
dataType

Data type
as.data.frame

Get a data.frame with raster cell values
distance

Distance
edge

Edge detection
getValuesBlock

Get a block of raster cell values
distanceFromPoints

Distance from points
Raster-class

Raster* classes
movingFun

Moving functions
Math-methods

Mathematical functions
Gain and offset

Gain and offset of values on file
inifile

Read a .ini file
boxplot

Box plot of Raster objects
extremeValues

Minimum and maximum values
mask

Mask values in a Raster object
blockSize

Block size for writing files
rasterFromCells

Subset a raster by cell numbers
draw

Draw a line or polygon
area

Size of cells
merge

Merge RasterLayers
Arith-methods

Arithmic with Raster* objects
rasterToPoints

Raster to points conversion
cover

Replace NA values with values of other layers
predict

Spatial model predictions
calc

Calculate
focal

Focal
direction

Direction
rasterFromXYZ

Create a RasterLayer from x, y, z values
rowFromCell

Row or column number from a cell number
flip

Flip
origin

Origin
overlay

Overlay Raster objects
gridDistance

Grid distance
interpolate

Interpolate
sampleRegular

Regular sample
raster-package

An overview of the functions in this package
Extract by index

Indexing to extract values of a Raster* object
Programming

Helper functions for programming
expand

Expand
cellsFromExtent

Cells from Extent
filename

Filename
hdr

Header files
click

Click on a map
as.logical

Change values to logical
alignExtent

Align an extent (object of class Extent)
cellStats

Cell statistics
Logic-methods

Logical operators and functions
freq

Frequency table
head

Show the head or tail of a Raster* object
pairs

Pairs plot (matrix of scatterplots)
density

Density plot
count

Count
Options

Global options for the raster package
rasterToContour

Raster to contour lines conversion
xyFromCell

Coordinates from a row, column or cell number
addLayer

Add or drop a layer
crop

Crop
getValues

Get raster cell values
nlayers

Number of layers
filledContour

Filled contour plot
sampleRandom

Random sample
unionExtent

Extent union
stackSelect

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

Set values of a Raster object
raster

Create a RasterLayer object
projection

Get or set a projection
drawExtent

Create an Extent object by drawing on a map
nudgeExtent

Round extent coordinates
subset

Subset layers in a Raster* object
hist

Histogram
hillShade

Hill shading
setMinMax

Compute min and max values
rotate

Rotate
disaggregate

Disaggregate
shift

Shift
image

Image
pointDistance

Distance between points
isLonLat

Is this longitude/latitude data?
obsolete

Obsolete functions
readAll

Read values from disk
resolution

Resolution
resample

Resample a Raster object
validCell

Validity of a cell, column or row number
Slope and aspect

Slope and aspect
projectRaster

Project a Raster object
mosaic

Merge RasterLayers using a function for overlapping areas
saverasterstack

Save or open a RasterStack file
plot

Plot a Raster* object
plotRGB

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

Extent
zoom

Zoom in on a plot
unstack

Unstack
factors

Factors
reclass

Reclassify
rasterize

Rasterize points, lines, or polygons
scalebar

scalebar
Cluster

Use a multi-core (snow) cluster
rectify

rectify a Raster object
focalFilter

Focal filter
zApply

z (time) apply
replacement

Replace cell values of a Raster* object
quantile

Raster quantiles
persp

Perspective plot
initialize

Intitialize
setExtent

Set the extent of a RasteLayer
stack

Create a RasterStack object
getData

Get geographic data
extract

Extract values from Raster objects
unique

Unique values
bands

Number of bands
rotated

Do the raster cells have a rotation?
SampleInt

Sample integer values
spplot

Use spplot to plot a Raster* object
round

Integer values
misc stats

Miscellaneous statistical functions
substitute

Substitute values in a RasterLayer
zonal

Zonal statistics
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
writeRaster

Write raster data to a file
NAvalue

Set the NA value of a RasterLayer
writeValues

Write values to a file
trim

Trim
update

Update raster cells of files (on disk)
rasterToPolygons

Raster to polygons conversion
ncell

Number or rows, columns, and cells of a Raster* object
z-values

Get or set z-values
which

Which cells are TRUE?
transpose

Transpose
writeFormats

File types for writing
polygonFromExtent

Polygon from Extent
KML

Write a KML or KMZ file
Summary-methods

Summary methods
cellFrom

Get cell, row, or column number
contour

Contour plot
dim

Dimensions of a Raster* object
properties

Raster file properties
rasterTmpFile

Temporary files
Summary

Summary
Extent-class

Class "Extent"
aggregate

Aggregate cells
brick

Create a RasterBrick object
compare

Compare
clump

Detect clumps
rasterizeObsolete

Obsolete