Learn R Programming

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

raster (version 1.8-22)

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.8-22

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

May 13th, 2011

Functions in raster (1.8-22)

atan2

Two argument arc-tangent
brick

Create a RasterBrick object
calc

Calculate
cellsFromExtent

Cells from Extent
clump

Detect clumps
Extent-class

Class "Extent"
clearValues

Clear values
ncell

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

Create an Extent object by drawing on a map
hist

Histogram
Raster-class

Raster* classes
dataType

Data type
compare

Compare
cellFrom

Get cell, row, or column number
boxplot

Box plot of Raster objects
as.logical

Change values to logical
rasterTmpFile

Temporary files
datasource

Are values in memory and/or on disk?
Extent coordinates

Coordinates of the Extent of a Raster object
as.matrix

Get a matrix with raster cell values
density

Density plot
cellValues

Obsolete functions
freq

Frequency table
distance

Distance
extremeValues

Minimum and maximum values
rasterizeObsolete

Obsolete
Summary-methods

Summary methods
dim

Dimensions of a Raster* object
Compare-methods

Compare Raster* objects
cover

Replace NA values with values of other layers
Logic-methods

Logical operators and functions
getData

Get geographic data
interpolate

Interpolate
initialize

Intitialize
focal

Focal
extent

Extent
setMinMax

Compute min and max values
count

Count
Cluster

Use a multi-core (snow) cluster
distanceFromPoints

Distance from points
shift

Shift
predict

Spatial model predictions
draw

Draw a line or polygon
plotRGB

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

Cell statistics
mask

Mask values in a Raster object
polygonFromExtent

Polygon from Extent
alignExtent

Align an extent (object of class Extent)
rasterToPoints

Raster to points conversion
pointDistance

Distance between points
focalFilter

Focal filter
bands

Number of bands
setExtent

Set the extent of a RasteLayer
Options

Global options for the raster package
extract

Extract values from Raster objects
expand

Expand
intersectExtent

Extent intersection
factors

Factors
nlayers

Number of layers
mosaic

Merge RasterLayers using a function for overlapping areas
getValues

Get raster cell values
contour

Contour plot
adjacency

Adjacency
rasterFromCells

Subset a raster by cell numbers
crosstab

Cross-tabulate
unstack

Unstack
writeFormats

File types for writing
area

Size of cells
click

Click on a map
Gain and offset

Gain and offset of values on file
validCell

Validity of a cell, column or row number
resample

Resample a Raster object
getValuesBlock

Get a block of raster cell values
Programming

Helper functions for programming
substitute

Substitute values in a RasterLayer
rasterToContour

Raster to contour lines conversion
round

Integer values
quantile

Raster quantiles
rasterize

Rasterize points, lines, or polygons
rectify

rectify a Raster object
replacement

Extract or replace cell values of a Raster object
update

Update raster cells of files (on disk)
Summary

Summary
writeRaster

Write raster data to a file
nudgeExtent

Round extent coordinates
filename

Filename
plot3D

Interactive 3D plot of a RasterLayer
hillShade

Hill shading
rowFromCell

Row or column number from a cell number
reclass

Reclassify
raster-package

An overview of the functions in this package
unique

Unique values
zoom

Zoom in on a plot
saverasterstack

Save or open a RasterStack file
raster

Create a RasterLayer object
direction

Direction
pairs

Pairs plot (matrix of scatterplots)
stackSelect

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

Show the head or tail of a Raster* object
stack

Create a RasterStack object
aggregate

Aggregate cells
xyFromCell

Coordinates from a row, column or cell number
sampleRandom

Random sample
blockSize

Block size for writing files
overlay

Overlay Raster objects
persp

Perspective plot
properties

Raster file properties
subset

Subset layers in a Raster* object
rasterFromXYZ

Create a RasterLayer from x, y, z values
readAll

Read values from disk
Arith-methods

Arithmic with Raster* objects
trim

Trim
origin

Origin
setValues

Set values of a Raster object
writeValues

Write values to a file
transpose

Transpose
Slope and aspect

Slope and aspect
sampleRegular

Regular sample
unionExtent

Extent union
stats

Miscellaneous statistical functions
rotated

Do the raster cells have a rotation?
isLonLat

Is this longitude/latitude data?
KML

Write a KML or KMZ file
hdr

Header files
plot

Plot a Raster* object
Math-methods

Mathematical functions
rotate

Rotate
crop

Crop
cut

Convert values to classes
disaggregate

Disaggregate
extension

Filename extensions
flip

Flip
inifile

Read a .ini file
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
image

Image
rasterToPolygons

Raster to polygons conversion
SampleInt

Sample integer values
autocorrelation

Spatial autocorrelation
gridDistance

Grid distance
filledContour

Filled contour plot
resolution

Resolution
NAvalue

Set the NA value of a RasterLayer
addLayer

Add or drop a layer
edge

Edge detection
projectRaster

Project a Raster object
obsolete

Obsolete functions
which

Which cells are TRUE?
projection

Get or set a projection
zonal

Zonal statistics
merge

Merge RasterLayers