Learn R Programming

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

raster (version 1.9-63)

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

154,880

Version

1.9-63

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

January 15th, 2012

Functions in raster (1.9-63)

Extent-class

Class "Extent"
filledContour

Filled contour plot
cv

Coefficient of variation
contour

Contour plot
as.raster

Coerce to a 'raster' object
Raster-class

Raster* classes
distanceFromPoints

Distance from points
hist

Histogram
overlay

Overlay Raster objects
draw

Draw a line or polygon
freq

Frequency table
alignExtent

Align an extent (object of class Extent)
head

Show the head or tail of a Raster* object
calc

Calculate
getValuesBlock

Get a block of raster cell values
distance

Distance
obsolete

Obsolete functions
boxplot

Box plot of Raster objects
click

Click on a map
rasterFromCells

Subset a raster by cell numbers
intersect

Intersect Extent
cellsFromExtent

Cells from Extent
buffer

buffer
shift

Shift
cellFrom

Get cell, row, or column number
intersectExtent

Extent intersection
extremeValues

Minimum and maximum values
extract

Extract values from Raster objects
saverasterstack

Save or open a RasterStack file
cellStats

Cell statistics
autocorrelation

Spatial autocorrelation
datasource

Are values in memory and/or on disk?
blockSize

Block size for writing files
isLonLat

Is this longitude/latitude data?
extension

Filename extensions
hillShade

Hill shading
crosstab

Cross-tabulate
crop

Crop
match

Value matching for Raster* objects
projection

Get or set a projection
cluster

Use a multi-core cluster
resolution

Resolution
quantile

Raster quantiles
cover

Replace NA values with values of other layers
Compare-methods

Compare Raster* objects
expand

Expand
addLayer

Add or drop a layer
properties

Raster file properties
projectRaster

Project a Raster object
nlayers

Number of layers
approxNA

Estimate values for cells that are NA
update

Update raster cells of files (on disk)
plot

Plot a Raster* object
bands

Number of bands
cut

Convert values to classes
Summary

Summary
ncell

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

Raster to polygons conversion
mosaic

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

rectify a Raster object
focal

Focal values
disaggregate

Disaggregate
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
clearValues

Clear values
extent

Extent
resample

Resample a Raster object
unique

Unique values
compare

Compare
drawExtent

Create an Extent object by drawing on a map
clump

Detect clumps
rotated

Do the raster cells have a rotation?
union

Union Extent
direction

Direction
adjacency

Pairs of adjacent cells
scalebar

scalebar
image

Image
replacement

Replace cell values of a Raster* object
getData

Get geographic data
Arith-methods

Arithmetic with Raster* objects
Math-methods

Mathematical functions
Extent coordinates

Coordinates of the Extent of a Raster object
count

Count
pairs

Pairs plot (matrix of scatterplots)
atan2

Two argument arc-tangent
flip

Flip
gridDistance

Grid distance
area

Size of cells
as.logical

Change values to logical
edge

Edge detection
Gain and offset

Gain and offset of values on file
Logic-methods

Logical operators and functions
brick

Create a RasterBrick object
sampleRegular

Regular sample
density

Density plot
persp

Perspective plot
dim

Dimensions of a Raster* object
aggregate

Aggregate cells
polygonFromExtent

Polygon from Extent
filename

Filename
merge

Merge
hdr

Header files
dataType

Data type
SampleInt

Sample integer values
setExtent

Set the extent of a RasteLayer
reclass

Reclassify
mask

Mask values in a Raster object
zApply

z (time) apply
Extent math

round Extent coordinates
modal

modal value
stackSelect

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

Moving functions
setValues

Set values of a Raster object
terrain

Terrain characteristics
rasterFromXYZ

Create a RasterLayer from x, y, z values
sampleRandom

Random sample
zoom

Zoom in on a plot
rasterToPoints

Raster to points conversion
Extract by index

Indexing to extract values of a Raster* object
raster-package

An overview of the functions in this package
subset

Subset layers in a Raster* object
rasterTmpFile

Temporary files
setMinMax

Compute min and max values
plotRGB

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

Zonal statistics
transpose

Transpose
writeRaster

Write raster data to a file
Slope and aspect

Slope and aspect
unstack

Unstack
which

Which cells are TRUE?
z-values

Get or set z-values
unionExtent

Extent union
pointDistance

Distance between points
rasterToContour

Raster to contour lines conversion
trim

Trim
factors

Factors
rasterize

Rasterize points, lines, or polygons
interpolate

Interpolate
raster

Create a RasterLayer object
round

Integer values
rowFromCell

Row or column number from a cell number
writeFormats

File types for writing
rotate

Rotate
NAvalue

Set the NA value of a RasterLayer
stack

Create a RasterStack object
substitute

Substitute values in a RasterLayer
readAll

Read values from disk
xyFromCell

Coordinates from a row, column or cell number
KML

Write a KML or KMZ file
Summary-methods

Summary methods
as.data.frame

Get a data.frame with raster cell values
getValues

Get raster cell values
inifile

Read a .ini file
predict

Spatial model predictions
spplot

Use spplot to plot a Raster* object
writeValues

Write values to a file
as.matrix

Get a matrix with raster cell values
adjacent

Adjacent cells
initialize

Intitialize
origin

Origin
Options

Global options for the raster package
Programming

Helper functions for programming
validCell

Validity of a cell, column or row number