Learn R Programming

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

raster (version 2.0-05)

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

153,616

Version

2.0-05

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 21st, 2012

Functions in raster (2.0-05)

count

Count
getValuesFocal

Get focal raster cell values
properties

Raster file properties
rasterToPoints

Raster to points conversion
substitute

Substitute values in a Raster* object
Arith-methods

Arithmetic with Raster* objects
blockSize

Block size for writing files
cut

Convert values to classes
Compare-methods

Compare Raster* objects
Extract by index

Indexing to extract values of a Raster* object
freq

Frequency table
as.logical

Change values to logical
interpolate

Interpolate
image

Image
mask

Mask values in a Raster object
Extent math

round Extent coordinates
rectify

rectify a Raster object
xyFromCell

Coordinates from a row, column or cell number
replacement

Replace cell values of a Raster* object
writeRaster

Write raster data to a file
Summary

Summary
clump

Detect clumps
Extent-class

Class "Extent"
aggregate

Aggregate cells
datasource

Are values in memory and/or on disk?
hist

Histogram
intersect

Intersect Extent
cellStats

Cell statistics
Logic-methods

Logical operators and functions
approxNA

Estimate values for cells that are NA
autocorrelation

Spatial autocorrelation
extent

Extent
direction

Direction
factors

Factors
crop

Crop
drawExtent

Create an Extent object by drawing on a map
plot

Plot a Raster* object
modal

modal value
quantile

Raster quantiles
flip

Flip
distance

Distance
merge

Merge Raster* objects
filename

Filename
rasterToContour

Raster to contour lines conversion
focal

Focal values
addLayer

Add or drop a layer
getData

Get geographic data
Gain and offset

Gain and offset of values on file
as.data.frame

Get a data.frame with raster cell values, or coerce a SpatialPolygons, Lines, or Points file to a data.frame
as.matrix

Get a matrix with raster cell values
unionExtent

Extent union
ncell

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

Names of raster layers
rowFromCell

Row or column number from a cell number
subset

Subset layers in a Raster* object
extension

Filename extensions
Slope and aspect

Slope and aspect
projection

Get or set a coordinate reference system (projection)
atan2

Two argument arc-tangent
contour

Contour plot
head

Show the head or tail of a Raster* object
rasterFromCells

Subset a raster by cell numbers
Options

Global options for the raster package
adjacent

Adjacent cells
trim

Trim
rasterTmpFile

Temporary files
setMinMax

Compute min and max values
isLonLat

Is this longitude/latitude data?
sampleStratified

Stratified random sample
scalebar

scalebar
shapefile

Read a shapefile
setValues

Set values of a Raster object
z-values

Get or set z-values
stack

Create a RasterStack object
cv

Coefficient of variation
terrain

Terrain characteristics
round

Integer values
crosstab

Cross-tabulate
resample

Resample a Raster object
writeValues

Write values to a file
unique

Unique values
dataType

Data type
alignExtent

Align an extent (object of class Extent)
which

Which cells are TRUE?
inifile

Read a .ini file
KML

Write a KML or KMZ file
density

Density plot
as.raster

Coerce to a 'raster' object
intersectExtent

Extent intersection
expand

Expand
match

Value matching for Raster* objects
hillShade

Hill shading
rasterize

Rasterize points, lines, or polygons
getValuesBlock

Get a block of raster cell values
Math-methods

Mathematical functions
getValues

Get raster cell values
edge

Edge detection
Raster-class

Raster* classes
reclass

Reclassify
readAll

Read values from disk
cellFrom

Get cell, row, or column number
zApply

z (time) apply
saverasterstack

Save or open a RasterStack file
raster

Create a RasterLayer object
origin

Origin
cluster

Use a multi-core cluster
filledContour

Filled contour plot
plotRGB

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

Sample integer values
pointDistance

Distance between points
union

Union Extent
mosaic

overlay

Overlay Raster objects
rasterToPolygons

Raster to polygons conversion
initialize

Intitialize
sampleRandom

Random sample
draw

Draw a line or polygon
setExtent

Set the extent of a RasteLayer
transpose

Transpose
validCell

Validity of a cell, column or row number
writeFormats

File types for writing
predict

Spatial model predictions
weighted.mean

Weighted mean of rasters
cellsFromExtent

Cells from Extent
rotated

Do the raster cells have a rotation?
sampleRegular

Regular sample
shift

Shift
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
resolution

Resolution
boxplot

Box plot of Raster objects
projectRaster

Project a Raster object
spplot

Use spplot to plot a Raster* object
text

Add labels to a map
area

Size of cells
compare

Compare
layerStats

Correlation and (weighted) covariance
buffer

buffer
nlayers

Number of layers
zoom

Zoom in on a plot
raster-package

An overview of the functions in this package
Extent coordinates

Coordinates of the Extent of a Raster object
bands

Number of bands
Programming

Helper functions for programming
extract

Extract values from Raster objects
hdr

Header files
NAvalue

Set the NA value of a RasterLayer
pairs

Pairs plot (matrix of scatterplots)
rotate

Rotate
rasterFromXYZ

Create a RasterLayer from x, y, z values
brick

Create a RasterBrick object
gridDistance

Grid distance
zonal

Zonal statistics
stackSelect

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

Update raster cells of files (on disk)
adjacency

Pairs of adjacent cells
disaggregate

Disaggregate
clearValues

Clear values
persp

Perspective plot
click

Click on a map
unstack

Unstack
Summary-methods

Summary methods
calc

Calculate
cover

Replace NA values with values of other layers
dim

Dimensions of a Raster* object
distanceFromPoints

Distance from points
extremeValues

Minimum and maximum values
movingFun

Moving functions