Learn R Programming

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

raster (version 2.0-04)

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 and processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

125,710

Version

2.0-04

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 18th, 2012

Functions in raster (2.0-04)

clump

Detect clumps
dataType

Data type
Math-methods

Mathematical functions
filledContour

Filled contour plot
extent

Extent
cellsFromExtent

Cells from Extent
Arith-methods

Arithmetic with Raster* objects
cluster

Use a multi-core cluster
clearValues

Clear values
calc

Calculate
crop

Crop
addLayer

Add or drop a layer
autocorrelation

Spatial autocorrelation
as.raster

Coerce to a 'raster' object
cv

Coefficient of variation
cellFrom

Get cell, row, or column number
cover

Replace NA values with values of other layers
cut

Convert values to classes
atan2

Two argument arc-tangent
direction

Direction
count

Count
compare

Compare
focal

Focal values
alignExtent

Align an extent (object of class Extent)
click

Click on a map
getData

Get geographic data
plot

Plot a Raster* object
KML

Write a KML or KMZ file
distanceFromPoints

Distance from points
Extract by index

Indexing to extract values of a Raster* object
layerStats

Correlation and (weighted) covariance
extension

Filename extensions
Extent coordinates

Coordinates of the Extent of a Raster object
intersect

Intersect Extent
setMinMax

Compute min and max values
predict

Spatial model predictions
dim

Dimensions of a Raster* object
rotated

Do the raster cells have a rotation?
plotRGB

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

Read a .ini file
pointDistance

Distance between points
blockSize

Block size for writing files
unionExtent

Extent union
gridDistance

Grid distance
factors

Factors
buffer

buffer
sampleRegular

Regular sample
rasterize

Rasterize points, lines, or polygons
mask

Mask values in a Raster object
drawExtent

Create an Extent object by drawing on a map
nlayers

Number of layers
expand

Expand
Raster-class

Raster* classes
extract

Extract values from Raster objects
properties

Raster file properties
adjacent

Adjacent cells
rasterToPoints

Raster to points conversion
as.matrix

Get a matrix with raster cell values
intersectExtent

Extent intersection
flip

Flip
adjacency

Pairs of adjacent cells
hdr

Header files
terrain

Terrain characteristics
head

Show the head or tail of a Raster* object
Summary-methods

Summary methods
density

Density plot
contour

Contour plot
pairs

Pairs plot (matrix of scatterplots)
raster-package

An overview of the functions in this package
setValues

Set values of a Raster object
getValuesBlock

Get a block of raster cell values
interpolate

Interpolate
reclass

Reclassify
rasterTmpFile

Temporary files
image

Image
Logic-methods

Logical operators and functions
freq

Frequency table
replacement

Replace cell values of a Raster* object
Programming

Helper functions for programming
saverasterstack

Save or open a RasterStack file
rasterToContour

Raster to contour lines conversion
writeFormats

File types for writing
hillShade

Hill shading
resample

Resample a Raster object
Extent math

round Extent coordinates
rasterFromCells

Subset a raster by cell numbers
union

Union Extent
merge

Merge Raster* objects
projection

Get or set a coordinate reference system (projection)
rowFromCell

Row or column number from a cell number
projectRaster

Project a Raster object
approxNA

Estimate values for cells that are NA
spplot

Use spplot to plot a Raster* object
aggregate

Aggregate cells
which

Which cells are TRUE?
rectify

rectify a Raster object
transpose

Transpose
movingFun

Moving functions
scalebar

scalebar
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
hist

Histogram
text

Add labels to a map
SampleInt

Sample integer values
update

Update raster cells of files (on disk)
readAll

Read values from disk
resolution

Resolution
NAvalue

Set the NA value of a RasterLayer
zoom

Zoom in on a plot
draw

Draw a line or polygon
rotate

Rotate
datasource

Are values in memory and/or on disk?
trim

Trim
modal

modal value
Slope and aspect

Slope and aspect
edge

Edge detection
round

Integer values
area

Size of cells
mosaic

weighted.mean

Weighted mean of rasters
subset

Subset layers in a Raster* object
stackSelect

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

Overlay Raster objects
rasterToPolygons

Raster to polygons conversion
crosstab

Cross-tabulate
shapefile

Read a shapefile
shift

Shift
disaggregate

Disaggregate
zonal

Zonal statistics
boxplot

Box plot of Raster objects
sampleStratified

Stratified random sample
isLonLat

Is this longitude/latitude data?
extremeValues

Minimum and maximum values
getValues

Get raster cell values
ncell

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

Raster quantiles
validCell

Validity of a cell, column or row number
writeRaster

Write raster data to a file
unique

Unique values
filename

Filename
getValuesFocal

Get focal raster cell values
Gain and offset

Gain and offset of values on file
distance

Distance
match

Value matching for Raster* objects
sampleRandom

Random sample
substitute

Substitute values in a Raster* object
Summary

Summary
xyFromCell

Coordinates from a row, column or cell number
Extent-class

Class "Extent"
as.data.frame

Get a data.frame with raster cell values
cellStats

Cell statistics
as.logical

Change values to logical
names

Names of raster layers
origin

Origin
setExtent

Set the extent of a RasteLayer
stack

Create a RasterStack object
bands

Number of bands
Compare-methods

Compare Raster* objects
brick

Create a RasterBrick object
initialize

Intitialize
persp

Perspective plot
Options

Global options for the raster package
raster

Create a RasterLayer object
rasterFromXYZ

Create a RasterLayer from x, y, z values
writeValues

Write values to a file
z-values

Get or set z-values
zApply

z (time) apply
unstack

Unstack