Learn R Programming

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

raster (version 1.8-12)

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-12

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

April 12th, 2011

Functions in raster (1.8-12)

crosstab

Cross-tabulate
click

Click on a map
Logic-methods

Logical operators and functions
crop

Crop
expand

Expand
density

Density plot
contour

Contour plot
Extent-class

Class "Extent"
flip

Flip
getData

Get geographic data
rasterFromCells

Subset a raster by cell numbers
resample

Resample a Raster object
persp

Perspective plot
sampleRandom

Random sample
quantile

Raster quantiles
count

Count
datasource

Are values in memory and/or on disk?
overlay

Overlay Raster objects
trim

Trim
cellsFromExtent

Cells from Extent
atan2

Two argument arc-tangent
ncell

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

Regular sample
obsolete

Obsolete functions
KML

Write a KML file
area

Size of cells
getValuesBlock

Get a block of raster cell values
hdr

Header files
disaggregate

Disaggregate
draw

Draw a line or polygon
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
compare

Compare
distanceFromPoints

Distance from points
edge

Edge detection
mask

Mask values in a Raster object
Compare-methods

Compare Raster* objects
setExtent

Set the extent of a RasteLayer
cellStats

Cell statistics
addLayer

Add or drop a layer
dataType

Data type
direction

Direction
rasterFromXYZ

Create a RasterLayer from x, y, z values
stackSelect

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

Mathematical functions
nlayers

Number of layers
clearValues

Clear values
origin

Origin
projectRaster

Project a Raster object
Arith-methods

Arithmic with Raster* objects
zoom

Zoom in on a plot
SampleInt

Sample integer values
mosaic

Merge RasterLayers using a function for overlapping areas
cellFrom

Get cell, row, or column number
rasterToPoints

Raster to points conversion
nudgeExtent

Round extent coordinates
transpose

transpose
isLonLat

Is this longitude/latitude data?
drawExtent

Create an Extent object by drawing on a map
Summary-methods

Summary methods
plot3D

Interactive 3D plot of a RasterLayer
cut

Convert values to classes
getValues

Get raster cell values
Slope and aspect

Slope and aspect
unstack

Unstack
rasterToPolygons

Raster to polygons conversion
focal

Focal
Options

Global options for the raster package
Gain and offset

Gain and offset of values on file
readAll

Read values from disk
validCell

Validity of a cell, column or row number
gridDistance

Grid distance
extract

Extract values from Raster objects
plotRGB

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

Get or set a projection
calc

Calculate
replacement

Extract or replace cell values of a Raster object
shift

Shift
stats

Miscellaneous statistical functions
extremeValues

Minimum and maximum values
Raster-class

Raster* classes
cellValues

Obsolete functions
factors

Factors
rowFromCell

Row or column number from a cell number
Extent coordinates

Coordinates of the Extent of a Raster object
NAvalue

Set the NA value of a RasterLayer
cover

Replace NA values with values of other layers
stack

Create a RasterStack object
round

Integer values
xyFromCell

Coordinates from a row, column or cell number
hist

Histogram
raster

Create a RasterLayer object
distance

Distance
rasterToContour

Raster to contour lines conversion
saverasterstack

Save or open a RasterStack file
subset

Subset layers in a Raster* object
filledContour

Filled contour plot
intersectExtent

Extent intersection
unique

Unique values
substitute

Substitute values in a RasterLayer
bands

Number of bands
zonal

Zonal statistics
as.logical

Change values to logical
resolution

Resolution
which

Which cells are TRUE?
writeRaster

Write raster data to a file
rasterize

Rasterize points, lines, or polygons
rasterizeObsolete

Obsolete
polygonFromExtent

Polygon from Extent
blockSize

Block size for writing files
alignExtent

Align an extent (object of class Extent)
boxplot

Box plot of Raster objects
extension

Filename extensions
adjacency

Adjacency
freq

Frequency table
unionExtent

Extent union
writeFormats

File types for writing
aggregate

Aggregate cells
Cluster

Use a multi-core (snow) cluster
hillShade

Hill shading
dim

Dimensions of a Raster* object
initialize

Intitialize
Programming

Helper functions for programming
pointDistance

Distance between points
extent

Extent
reclass

Reclassify
setValues

Set values of a Raster object
image

Image
predict

Spatial model predictions
properties

Raster file properties
plot

Plot a Raster* object
inifile

Read a .ini file
interpolate

Interpolate
pairs

Pairs plot (matrix of scatterplots)
Summary

Summary
writeValues

Write values to a file
head

Show the head or tail of a Raster* object
update

Update raster cells of files (on disk)
clump

Detect clumps
filename

Filename
merge

Merge RasterLayers
raster-package

An overview of the functions in this package
as.matrix

Get a matrix with raster cell values
brick

Create a RasterBrick object
focalFilter

Focal filter
rasterTmpFile

Temporary files
rotate

Rotate
setMinMax

Compute min and max values