Learn R Programming

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

raster (version 1.9-82)

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

171,298

Version

1.9-82

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

April 6th, 2012

Functions in raster (1.9-82)

Math-methods

Mathematical functions
compare

Compare
Arith-methods

Arithmetic with Raster* objects
atan2

Two argument arc-tangent
freq

Frequency table
Extent coordinates

Coordinates of the Extent of a Raster object
rasterize

Rasterize points, lines, or polygons
flip

Flip
distance

Distance
Raster-class

Raster* classes
Extent-class

Class "Extent"
inifile

Read a .ini file
autocorrelation

Spatial autocorrelation
as.logical

Change values to logical
extent

Extent
pairs

Pairs plot (matrix of scatterplots)
which

Which cells are TRUE?
Compare-methods

Compare Raster* objects
stackSelect

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

Minimum and maximum values
head

Show the head or tail of a Raster* object
addLayer

Add or drop a layer
extension

Filename extensions
focal

Focal values
clearValues

Clear values
round

Integer values
bands

Number of bands
aggregate

Aggregate cells
filename

Filename
KML

Write a KML or KMZ file
sampleRandom

Random sample
blockSize

Block size for writing files
click

Click on a map
unique

Unique values
as.raster

Coerce to a 'raster' object
Extract by index

Indexing to extract values of a Raster* object
disaggregate

Disaggregate
brick

Create a RasterBrick object
adjacency

Pairs of adjacent cells
calc

Calculate
getValuesFocal

Get focal raster cell values
hillShade

Hill shading
rasterFromCells

Subset a raster by cell numbers
as.matrix

Get a matrix with raster cell values
modal

modal value
count

Count
drawExtent

Create an Extent object by drawing on a map
interpolate

Interpolate
readAll

Read values from disk
extract

Extract values from Raster objects
getValues

Get raster cell values
terrain

Terrain characteristics
Gain and offset

Gain and offset of values on file
Summary-methods

Summary methods
gridDistance

Grid distance
boxplot

Box plot of Raster objects
subset

Subset layers in a Raster* object
isLonLat

Is this longitude/latitude data?
dim

Dimensions of a Raster* object
cellStats

Cell statistics
mask

Mask values in a Raster object
intersect

Intersect Extent
cellFrom

Get cell, row, or column number
overlay

Overlay Raster objects
persp

Perspective plot
rasterToPoints

Raster to points conversion
stack

Create a RasterStack object
crop

Crop
datasource

Are values in memory and/or on disk?
density

Density plot
contour

Contour plot
buffer

buffer
projectRaster

Project a Raster object
quantile

Raster quantiles
raster-package

An overview of the functions in this package
Options

Global options for the raster package
rotate

Rotate
shift

Shift
plotRGB

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

Detect clumps
setMinMax

Compute min and max values
writeRaster

Write raster data to a file
cv

Coefficient of variation
getValuesBlock

Get a block of raster cell values
hdr

Header files
hist

Histogram
writeValues

Write values to a file
setExtent

Set the extent of a RasteLayer
image

Image
cover

Replace NA values with values of other layers
SampleInt

Sample integer values
validCell

Validity of a cell, column or row number
raster

Create a RasterLayer object
intersectExtent

Extent intersection
initialize

Intitialize
zoom

Zoom in on a plot
rasterToContour

Raster to contour lines conversion
saverasterstack

Save or open a RasterStack file
scalebar

scalebar
rasterTmpFile

Temporary files
merge

Merge
adjacent

Adjacent cells
reclass

Reclassify
writeFormats

File types for writing
z-values

Get or set z-values
predict

Spatial model predictions
rasterFromXYZ

Create a RasterLayer from x, y, z values
resample

Resample a Raster object
cellsFromExtent

Cells from Extent
as.data.frame

Get a data.frame with raster cell values
properties

Raster file properties
transpose

Transpose
rotated

Do the raster cells have a rotation?
substitute

Substitute values in a RasterLayer
setValues

Set values of a Raster object
factors

Factors
zApply

z (time) apply
rowFromCell

Row or column number from a cell number
rasterToPolygons

Raster to polygons conversion
zonal

Zonal statistics
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
cluster

Use a multi-core cluster
trim

Trim
replacement

Replace cell values of a Raster* object
movingFun

Moving functions
ncell

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

Number of layers
update

Update raster cells of files (on disk)
area

Size of cells
filledContour

Filled contour plot
Logic-methods

Logical operators and functions
origin

Origin
Extent math

round Extent coordinates
union

Union Extent
spplot

Use spplot to plot a Raster* object
xyFromCell

Coordinates from a row, column or cell number
mosaic

Merge Raster* objects, using a function to compute cell value for overlapping areas.
Summary

Summary
alignExtent

Align an extent (object of class Extent)
approxNA

Estimate values for cells that are NA
cut

Convert values to classes
expand

Expand
edge

Edge detection
pointDistance

Distance between points
unionExtent

Extent union
projection

Get or set a projection
rectify

rectify a Raster object
Slope and aspect

Slope and aspect
getData

Get geographic data
dataType

Data type
direction

Direction
draw

Draw a line or polygon
crosstab

Cross-tabulate
match

Value matching for Raster* objects
Programming

Helper functions for programming
NAvalue

Set the NA value of a RasterLayer
unstack

Unstack
plot

Plot a Raster* object
resolution

Resolution
distanceFromPoints

Distance from points
sampleRegular

Regular sample