Learn R Programming

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

raster (version 1.9-29)

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

125,710

Version

1.9-29

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 20th, 2011

Functions in raster (1.9-29)

rasterToContour

Raster to contour lines conversion
hillShade

Hill shading
Arith-methods

Arithmic with Raster* objects
Compare-methods

Compare Raster* objects
atan2

Two argument arc-tangent
nudgeExtent

Round extent coordinates
area

Size of cells
direction

Direction
draw

Draw a line or polygon
adjacency

Pairs of adjacent cells
projection

Get or set a projection
edge

Edge detection
brick

Create a RasterBrick object
cellsFromExtent

Cells from Extent
zoom

Zoom in on a plot
crop

Crop
bands

Number of bands
factors

Factors
datasource

Are values in memory and/or on disk?
filledContour

Filled contour plot
Extract by index

Indexing to extract values of a Raster* object
extension

Filename extensions
as.data.frame

Get a data.frame with raster cell values
clearValues

Clear values
interpolate

Interpolate
expand

Expand
predict

Spatial model predictions
Logic-methods

Logical operators and functions
as.logical

Change values to logical
transpose

Transpose
shift

Shift
autocorrelation

Spatial autocorrelation
getValuesBlock

Get a block of raster cell values
cover

Replace NA values with values of other layers
blockSize

Block size for writing files
click

Click on a map
mask

Mask values in a Raster object
count

Count
Raster-class

Raster* classes
nlayers

Number of layers
flip

Flip
unstack

Unstack
intersectExtent

Extent intersection
plot

Plot a Raster* object
rasterize

Rasterize points, lines, or polygons
compare

Compare
readAll

Read values from disk
cellFrom

Get cell, row, or column number
resample

Resample a Raster object
getValues

Get raster cell values
Math-methods

Mathematical functions
substitute

Substitute values in a RasterLayer
plotRGB

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

Dimensions of a Raster* object
writeValues

Write values to a file
alignExtent

Align an extent (object of class Extent)
terrain

Terrain characteristics
image

Image
distance

Distance
spplot

Use spplot to plot a Raster* object
raster

Create a RasterLayer object
inifile

Read a .ini file
filename

Filename
sampleRandom

Random sample
pairs

Pairs plot (matrix of scatterplots)
dataType

Data type
aggregate

Aggregate cells
calc

Calculate
Summary-methods

Summary methods
clump

Detect clumps
obsolete

Obsolete functions
rasterToPoints

Raster to points conversion
Programming

Helper functions for programming
head

Show the head or tail of a Raster* object
as.raster

Coerce to a 'raster' object
rasterToPolygons

Raster to polygons conversion
rasterFromCells

Subset a raster by cell numbers
hdr

Header files
freq

Frequency table
disaggregate

Disaggregate
polygonFromExtent

Polygon from Extent
focalFilter

Focal filter
Extent coordinates

Coordinates of the Extent of a Raster object
NAvalue

Set the NA value of a RasterLayer
raster-package

An overview of the functions in this package
focal_old

Focal (old functions)
update

Update raster cells of files (on disk)
unique

Unique values
stack

Create a RasterStack object
rotate

Rotate
extremeValues

Minimum and maximum values
writeRaster

Write raster data to a file
addLayer

Add or drop a layer
trim

Trim
boxplot

Box plot of Raster objects
replacement

Replace cell values of a Raster* object
zonal

Zonal statistics
stackSelect

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

Save or open a RasterStack file
as.matrix

Get a matrix with raster cell values
isLonLat

Is this longitude/latitude data?
properties

Raster file properties
mosaic

Merge RasterLayers using a function for overlapping areas
xyFromCell

Coordinates from a row, column or cell number
extent

Extent
distanceFromPoints

Distance from points
resolution

Resolution
scalebar

scalebar
getData

Get geographic data
Summary

Summary
gridDistance

Grid distance
persp

Perspective plot
which

Which cells are TRUE?
pointDistance

Distance between points
ncell

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

Global options for the raster package
adjacent

Adjacent cells
rasterTmpFile

Temporary files
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unionExtent

Extent union
setExtent

Set the extent of a RasteLayer
cluster

Use a multi-core (snow) cluster
KML

Write a KML or KMZ file
origin

Origin
setMinMax

Compute min and max values
zApply

z (time) apply
Gain and offset

Gain and offset of values on file
misc stats

Miscellaneous statistical functions
Extent-class

Class "Extent"
reclass

Reclassify
sampleRegular

Regular sample
validCell

Validity of a cell, column or row number
rectify

rectify a Raster object
subset

Subset layers in a Raster* object
extract

Extract values from Raster objects
quantile

Raster quantiles
Slope and aspect

Slope and aspect
cut

Convert values to classes
merge

Merge
projectRaster

Project a Raster object
contour

Contour plot
initialize

Intitialize
SampleInt

Sample integer values
writeFormats

File types for writing
z-values

Get or set z-values
overlay

Overlay Raster objects
crosstab

Cross-tabulate
drawExtent

Create an Extent object by drawing on a map
focal

Focal values
rowFromCell

Row or column number from a cell number
rotated

Do the raster cells have a rotation?
round

Integer values
cellStats

Cell statistics
hist

Histogram
density

Density plot
movingFun

Moving functions
rasterFromXYZ

Create a RasterLayer from x, y, z values
setValues

Set values of a Raster object