Learn R Programming

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

raster (version 1.9-27)

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

171,298

Version

1.9-27

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 12th, 2011

Functions in raster (1.9-27)

raster

Create a RasterLayer object
crop

Crop
disaggregate

Disaggregate
dim

Dimensions of a Raster* object
Options

Global options for the raster package
addLayer

Add or drop a layer
Logic-methods

Logical operators and functions
as.raster

Coerce to a 'raster' object
projection

Get or set a projection
adjacency

Pairs of adjacent cells
Extent-class

Class "Extent"
atan2

Two argument arc-tangent
extremeValues

Minimum and maximum values
flip

Flip
adjacent

Adjacent cells
factors

Factors
cover

Replace NA values with values of other layers
polygonFromExtent

Polygon from Extent
aggregate

Aggregate cells
Extent coordinates

Coordinates of the Extent of a Raster object
plot

Plot a Raster* object
rasterize

Rasterize points, lines, or polygons
count

Count
obsolete

Obsolete functions
boxplot

Box plot of Raster objects
cut

Convert values to classes
raster-package

An overview of the functions in this package
as.data.frame

Get a data.frame with raster cell values
clearValues

Clear values
stackSelect

Select cell values from a multi-layer Raster* object
Compare-methods

Compare Raster* objects
projectRaster

Project a Raster object
nlayers

Number of layers
setExtent

Set the extent of a RasteLayer
crosstab

Cross-tabulate
gridDistance

Grid distance
SampleInt

Sample integer values
origin

Origin
getValuesBlock

Get a block of raster cell values
cluster

Use a multi-core (snow) cluster
setMinMax

Compute min and max values
spplot

Use spplot to plot a Raster* object
filledContour

Filled contour plot
resolution

Resolution
stack

Create a RasterStack object
rotate

Rotate
datasource

Are values in memory and/or on disk?
Math-methods

Mathematical functions
pointDistance

Distance between points
head

Show the head or tail of a Raster* object
bands

Number of bands
readAll

Read values from disk
setValues

Set values of a Raster object
autocorrelation

Spatial autocorrelation
contour

Contour plot
brick

Create a RasterBrick object
click

Click on a map
cellsFromExtent

Cells from Extent
Arith-methods

Arithmic with Raster* objects
unionExtent

Extent union
drawExtent

Create an Extent object by drawing on a map
extension

Filename extensions
Gain and offset

Gain and offset of values on file
hillShade

Hill shading
quantile

Raster quantiles
compare

Compare
mosaic

Merge RasterLayers using a function for overlapping areas
interpolate

Interpolate
alignExtent

Align an extent (object of class Extent)
ncell

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

Save or open a RasterStack file
extent

Extent
edge

Edge detection
pairs

Pairs plot (matrix of scatterplots)
as.logical

Change values to logical
image

Image
focal_old

Focal (old functions)
KML

Write a KML or KMZ file
rasterFromXYZ

Create a RasterLayer from x, y, z values
getData

Get geographic data
sampleRegular

Regular sample
hdr

Header files
writeValues

Write values to a file
rasterFromCells

Subset a raster by cell numbers
misc stats

Miscellaneous statistical functions
rowFromCell

Row or column number from a cell number
blockSize

Block size for writing files
intersectExtent

Extent intersection
Slope and aspect

Slope and aspect
movingFun

Moving functions
cellStats

Cell statistics
subset

Subset layers in a Raster* object
nudgeExtent

Round extent coordinates
resample

Resample a Raster object
zApply

z (time) apply
overlay

Overlay Raster objects
direction

Direction
area

Size of cells
mask

Mask values in a Raster object
Summary-methods

Summary methods
Summary

Summary
trim

Trim
clump

Detect clumps
which

Which cells are TRUE?
distance

Distance
distanceFromPoints

Distance from points
round

Integer values
reclass

Reclassify
unique

Unique values
rotated

Do the raster cells have a rotation?
focal

Focal values
getValues

Get raster cell values
Extract by index

Indexing to extract values of a Raster* object
dataType

Data type
initialize

Intitialize
writeRaster

Write raster data to a file
validCell

Validity of a cell, column or row number
filename

Filename
Programming

Helper functions for programming
as.matrix

Get a matrix with raster cell values
freq

Frequency table
NAvalue

Set the NA value of a RasterLayer
expand

Expand
isLonLat

Is this longitude/latitude data?
inifile

Read a .ini file
merge

Merge
plotRGB

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

Random sample
unstack

Unstack
writeFormats

File types for writing
properties

Raster file properties
z-values

Get or set z-values
draw

Draw a line or polygon
terrain

Terrain characteristics
rasterToPolygons

Raster to polygons conversion
focalFilter

Focal filter
persp

Perspective plot
extract

Extract values from Raster objects
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
hist

Histogram
update

Update raster cells of files (on disk)
shift

Shift
transpose

Transpose
substitute

Substitute values in a RasterLayer
predict

Spatial model predictions
rasterToPoints

Raster to points conversion
replacement

Replace cell values of a Raster* object
calc

Calculate
zoom

Zoom in on a plot
rasterToContour

Raster to contour lines conversion
Raster-class

Raster* classes
cellFrom

Get cell, row, or column number
density

Density plot
rasterTmpFile

Temporary files
rectify

rectify a Raster object
scalebar

scalebar
zonal

Zonal statistics
xyFromCell

Coordinates from a row, column or cell number