Learn R Programming

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

raster (version 1.8-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

153,616

Version

1.8-27

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

May 27th, 2011

Functions in raster (1.8-27)

addLayer

Add or drop a layer
Extent-class

Class "Extent"
cellValues

Obsolete functions
getValues

Get raster cell values
image

Image
edge

Edge detection
extremeValues

Minimum and maximum values
mask

Mask values in a Raster object
extent

Extent
isLonLat

Is this longitude/latitude data?
Compare-methods

Compare Raster* objects
Gain and offset

Gain and offset of values on file
focalFilter

Focal filter
Raster-class

Raster* classes
crop

Crop
projectRaster

Project a Raster object
Cluster

Use a multi-core (snow) cluster
aggregate

Aggregate cells
calc

Calculate
direction

Direction
Arith-methods

Arithmic with Raster* objects
contour

Contour plot
rowFromCell

Row or column number from a cell number
adjacency

Adjacency
plot

Plot a Raster* object
dataType

Data type
merge

Merge RasterLayers
Options

Global options for the raster package
brick

Create a RasterBrick object
crosstab

Cross-tabulate
Slope and aspect

Slope and aspect
rasterize

Rasterize points, lines, or polygons
cover

Replace NA values with values of other layers
click

Click on a map
nlayers

Number of layers
extract

Extract values from Raster objects
drawExtent

Create an Extent object by drawing on a map
alignExtent

Align an extent (object of class Extent)
saverasterstack

Save or open a RasterStack file
as.logical

Change values to logical
getData

Get geographic data
dim

Dimensions of a Raster* object
rasterFromXYZ

Create a RasterLayer from x, y, z values
datasource

Are values in memory and/or on disk?
bands

Number of bands
filledContour

Filled contour plot
replacement

Extract or replace cell values of a Raster object
cellsFromExtent

Cells from Extent
count

Count
getValuesBlock

Get a block of raster cell values
blockSize

Block size for writing files
boxplot

Box plot of Raster objects
cellStats

Cell statistics
factors

Factors
density

Density plot
rasterToPolygons

Raster to polygons conversion
interpolate

Interpolate
flip

Flip
predict

Spatial model predictions
area

Size of cells
KML

Write a KML or KMZ file
stack

Create a RasterStack object
rasterTmpFile

Temporary files
cut

Convert values to classes
clump

Detect clumps
rasterFromCells

Subset a raster by cell numbers
reclass

Reclassify
round

Integer values
gridDistance

Grid distance
Logic-methods

Logical operators and functions
Summary-methods

Summary methods
rasterToContour

Raster to contour lines conversion
distanceFromPoints

Distance from points
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
focal

Focal
as.matrix

Get a matrix with raster cell values
plot3D

Interactive 3D plot of a RasterLayer
head

Show the head or tail of a Raster* object
rasterToPoints

Raster to points conversion
cellFrom

Get cell, row, or column number
rectify

rectify a Raster object
properties

Raster file properties
distance

Distance
mosaic

Merge RasterLayers using a function for overlapping areas
filename

Filename
subset

Subset layers in a Raster* object
setMinMax

Compute min and max values
sampleRegular

Regular sample
freq

Frequency table
obsolete

Obsolete functions
SampleInt

Sample integer values
intersectExtent

Extent intersection
plotRGB

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

Resolution
setValues

Set values of a Raster object
persp

Perspective plot
projection

Get or set a projection
readAll

Read values from disk
pointDistance

Distance between points
overlay

Overlay Raster objects
nudgeExtent

Round extent coordinates
Extent coordinates

Coordinates of the Extent of a Raster object
sampleRandom

Random sample
inifile

Read a .ini file
rotate

Rotate
Math-methods

Mathematical functions
hist

Histogram
pairs

Pairs plot (matrix of scatterplots)
Programming

Helper functions for programming
stackSelect

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

Spatial autocorrelation
rasterizeObsolete

Obsolete
draw

Draw a line or polygon
resample

Resample a Raster object
disaggregate

Disaggregate
initialize

Intitialize
extension

Filename extensions
polygonFromExtent

Polygon from Extent
raster-package

An overview of the functions in this package
origin

Origin
expand

Expand
ncell

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

Shift
atan2

Two argument arc-tangent
which

Which cells are TRUE?
Summary

Summary
substitute

Substitute values in a RasterLayer
stats

Miscellaneous statistical functions
trim

Trim
unionExtent

Extent union
zonal

Zonal statistics
unstack

Unstack
NAvalue

Set the NA value of a RasterLayer
unique

Unique values
compare

Compare
writeRaster

Write raster data to a file
hdr

Header files
rotated

Do the raster cells have a rotation?
xyFromCell

Coordinates from a row, column or cell number
writeValues

Write values to a file
validCell

Validity of a cell, column or row number
setExtent

Set the extent of a RasteLayer
quantile

Raster quantiles
zoom

Zoom in on a plot
transpose

Transpose
writeFormats

File types for writing
clearValues

Clear values
hillShade

Hill shading
raster

Create a RasterLayer object
update

Update raster cells of files (on disk)