Learn R Programming

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

raster (version 2.0-08)

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

2.0-08

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 28th, 2012

Functions in raster (2.0-08)

boxplot

Box plot of Raster objects
as.data.frame

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

Aggregate cells
cellFrom

Get cell, row, or column number
clump

Detect clumps
Arith-methods

Arithmetic with Raster* objects
alignExtent

Align an extent (object of class Extent)
Raster-class

Raster* classes
addLayer

Add or drop a layer
cluster

Use a multi-core cluster
adjacent

Adjacent cells
getValuesBlock

Get a block of raster cell values
extent

Extent
KML

Write a KML or KMZ file
atan2

Two argument arc-tangent
dataType

Data type
Extent coordinates

Coordinates of the Extent of a Raster object
clearValues

Clear values
Logic-methods

Logical operators and functions
modal

modal value
cellStats

Cell statistics
area

Size of cells
extremeValues

Minimum and maximum values
click

Click on a map
calc

Calculate
flip

Flip
plot

Plot a Raster* object
density

Density plot
crop

Crop
reclass

Reclassify
intersect

Intersect Extent
rotated

Do the raster cells have a rotation?
brick

Create a RasterBrick object
rasterToPoints

Raster to points conversion
disaggregate

Disaggregate
ncell

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

Number of bands
adjacency

Pairs of adjacent cells
getValues

Get raster cell values
getData

Get geographic data
distance

Distance
projection

Get or set a coordinate reference system (projection)
pointDistance

Distance between points
cut

Convert values to classes
scalebar

scalebar
Summary-methods

Summary methods
factors

Factors
autocorrelation

Spatial autocorrelation
round

Integer values
merge

Merge Raster* objects
zonal

Zonal statistics
match

Value matching for Raster* objects
plotRGB

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

distanceFromPoints

Distance from points
blockSize

Block size for writing files
pairs

Pairs plot (matrix of scatterplots)
SampleInt

Sample integer values
edge

Edge detection
replacement

Replace cell values of a Raster* object
Math-methods

Mathematical functions
as.logical

Change values to logical
layerStats

Correlation and (weighted) covariance
intersectExtent

Extent intersection
persp

Perspective plot
head

Show the head or tail of a Raster* object
Gain and offset

Gain and offset of values on file
filledContour

Filled contour plot
raster-package

An overview of the functions in this package
expand

Expand
hdr

Header files
cv

Coefficient of variation
crosstab

Cross-tabulate
buffer

buffer
direction

Direction
stackSelect

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

Create an Extent object by drawing on a map
Summary

Summary
names

Names of raster layers
getValuesFocal

Get focal raster cell values
compare

Compare
extract

Extract values from Raster objects
contour

Contour plot
dim

Dimensions of a Raster* object
validCell

Validity of a cell, column or row number
Slope and aspect

Slope and aspect
update

Update raster cells of files (on disk)
rasterToPolygons

Raster to polygons conversion
initialize

Intitialize
inifile

Read a .ini file
raster

Create a RasterLayer object
NAvalue

Set the NA value of a RasterLayer
focal

Focal values
sampleRandom

Random sample
rasterToContour

Raster to contour lines conversion
substitute

Substitute values in a Raster* object
overlay

Overlay Raster objects
unstack

Unstack
cover

Replace NA values with values of other layers
Extent-class

Class "Extent"
cellsFromExtent

Cells from Extent
datasource

Are values in memory and/or on disk?
as.matrix

Get a matrix with raster cell values
extension

Filename extensions
sampleStratified

Stratified random sample
filename

Filename
gridDistance

Grid distance
interpolate

Interpolate
image

Image
resolution

Resolution
freq

Frequency table
rasterFromXYZ

Create a RasterLayer from x, y, z values
transpose

Transpose
readAll

Read values from disk
trim

Trim
setExtent

Set the extent of a RasteLayer
z-values

Get or set z-values
movingFun

Moving functions
projectRaster

Project a Raster object
mask

Mask values in a Raster object
stackSave

Save or open a RasterStack file
writeRaster

Write raster data to a file
which

Which cells are TRUE?
rasterTmpFile

Temporary files
Programming

Helper functions for programming
union

Union Extent
shapefile

Read or write a shapefile
resample

Resample a Raster object
hist

Histogram
quantile

Raster quantiles
subset

Subset layers in a Raster* object
predict

Spatial model predictions
setValues

Set values of a Raster object
xyFromCell

Coordinates from a row, column or cell number
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
spplot

Use spplot to plot a Raster* object
rotate

Rotate
text

Add labels to a map
draw

Draw a line or polygon
isLonLat

Is this longitude/latitude data?
writeValues

Write values to a file
terrain

Terrain characteristics
zApply

z (time) apply
weighted.mean

Weighted mean of rasters
properties

Raster file properties
unionExtent

Extent union
rasterFromCells

Subset a raster by cell numbers
setMinMax

Compute min and max values
Extract by index

Indexing to extract values of a Raster* object
hillShade

Hill shading
rowFromCell

Row or column number from a cell number
Options

Global options for the raster package
Extent math

round Extent coordinates
zoom

Zoom in on a plot
Compare-methods

Compare Raster* objects
as.raster

Coerce to a 'raster' object
count

Count
stack

Create a RasterStack object
writeFormats

File types for writing
approxNA

Estimate values for cells that are NA
origin

Origin
nlayers

Number of layers
rectify

rectify a Raster object
rasterize

Rasterize points, lines, or polygons
sampleRegular

Regular sample
unique

Unique values
shift

Shift