Learn R Programming

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

raster (version 2.3-0)

raster: Geographic data analysis and modeling

Description

Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package implements basic and high-level functions. Processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

153,616

Version

2.3-0

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 6th, 2014

Functions in raster (2.3-0)

autocorrelation

Spatial autocorrelation
resolution

Resolution
distance

Distance
gridDistance

Distance on a grid
RGB

Create a Red-Green-Blue Raster object
modal

modal value
calc

Calculate
Extent-class

Class "Extent"
compareRaster

Compare Raster objects
clamp

Clamp values
movingFun

Moving functions
head

Show the head or tail of a Raster* object
getValuesBlock

Get a block of raster cell values
metadata

Metadata
as.raster

Coerce to a 'raster' object
crosstab

Cross-tabulate
contour

Contour plot
rasterToPolygons

Raster to polygons conversion
dim

Dimensions of a Raster* object
Summary-methods

Summary methods
SampleInt

Sample integer values
alignExtent

Align an extent (object of class Extent)
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
adjacent

Adjacent cells
approxNA

Estimate values for cell values that are NA by interpolating between layers
click

Query by clicking on a map
KML

Write a KML or KMZ file
crop

Crop
cellsFromExtent

Cells from Extent
terrain

Terrain characteristics
sampleStratified

Stratified random sample
Extract by index

Indexing to extract values of a Raster* object
compareCRS

Partially compare two CRS objects
atan2

Two argument arc-tangent
extract

Extract values from Raster objects
buffer

buffer
flip

Flip
as.data.frame

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

Read a .ini file
drawExtent

Create an Extent object by drawing on a map
origin

Origin
cv

Coefficient of variation
isLonLat

Is this longitude/latitude data?
Raster-class

Raster* classes
flowPath

Flow path
cluster

Use a multi-core cluster
factors

Factors
boundaries

boundaries (edges) detection
extremeValues

Minimum and maximum values
Compare-methods

Compare Raster* objects
cellFrom

Get cell, row, or column number
dataType

Data type
image

Image
cover

Replace NA values with values of other layers
cut

Convert values to classes
round

Integer values
pointDistance

Distance between points
validCell

Validity of a cell, column or row number
shift

Shift
stack

Create a RasterStack object
mosaic

Merge Raster* objects using a function for overlapping areas
Programming

Helper functions for programming
raster-package

Overview of the functions in the raster package
overlay

Overlay Raster objects
writeValues

Write values to a file
blockSize

Block size for writing files
clearValues

Clear values
as.matrix

Get a matrix with raster cell values
intersect

Intersect
readAll

Read values from disk
which

Which cells are TRUE?
update

Update raster cells of files (on disk)
quantile

Raster quantiles
merge

Merge Raster* objects
draw

Draw a line or polygon
getValues

Get raster cell values
extend

Extend
sampleRegular

Regular sample
weighted.mean

Weighted mean of rasters
NAvalue

Set the NA value of a RasterLayer
unique

Unique values
setMinMax

Compute min and max values
hist

Histogram
erase

Erase parts of a Spatial* object
writeRaster

Write raster data to a file
z-values

Get or set z-values
datasource

Are values in memory and/or on disk?
Arith-methods

Arithmetic with Raster* objects
ncell

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

Bar plot of a RasterLayer
extension

Filename extensions
replacement

Replace cell values or layers of a Raster* object
shapefile

Read or write a shapefile
clump

Detect clumps
addLayer

Add or drop a layer
animate

Animate layers of a Raster* object
focalWeight

Focal weights matrix
focal

Focal values
direction

Direction
Logic-methods

Logical operators and functions
rasterTmpFile

Temporary files
cellStats

Statistics across cells
mask

Mask values in a Raster object
corrLocal

Local correlation coefficient
zoom

Zoom in on a map
plotRGB

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

Size of cells
filledContour

Filled contour plot
density

Density plot
raster

Create a RasterLayer object
unstack

Unstack
getData

Get geographic data
spplot

Use spplot to plot a Raster* object
Gain and offset

Gain and offset of values on file
Math-methods

Mathematical functions
rasterToPoints

Raster to points conversion
hillShade

Hill shading
as.logical

Change values to logical
Options

Global options for the raster package
plot

Plot a Raster* object
Extent coordinates

Coordinates of the Extent of a Raster object
bind

Bind Spatial* objects
brick

Create a RasterBrick object
freq

Frequency table
trim

Trim
getValuesFocal

Get focal raster cell values
zonal

Zonal statistics
match

Value matching for Raster* objects
disaggregate

Disaggregate
projection

Get or set a coordinate reference system (projection)
rotate

Rotate
distanceFromPoints

Distance from points
hdr

Header files
resample

Resample a Raster object
validNames

Create valid names
rasterize

Rasterize points, lines, or polygons
predict

Spatial model predictions
stackSave

Save or open a RasterStack file
pairs

Pairs plot (matrix of scatterplots)
sampleRandom

Random sample
rectify

rectify a Raster object
setValues

Set values of a Raster object
writeFormats

File types for writing
text

Add labels to a map
names

Names of raster layers
xyFromCell

Coordinates from a row, column or cell number
Summary

Summary
transpose

Transpose
scalebar

scalebar
symdif

Symetrical difference
setExtent

Set the extent of a RasterLayer
layerStats

Correlation and (weighted) covariance
bands

Number of bands
Slope and aspect

Slope and aspect
initialize

Intitialize
scale

Scale values
zApply

z (time) apply
which.min

Where is the min or max value?
stretch

Stretch
projectRaster

Project a Raster object
rasterFromXYZ

Create a RasterLayer from x, y, z values
subset

Subset layers in a Raster* object
Extent math

round Extent coordinates
stackSelect

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

Union Extent or SpatialPolygons* objects
boxplot

Box plot of Raster objects
filename

Filename
aggregate

Aggregate raster cells or polygons
interpolate

Interpolate
substitute

Substitute values in a Raster* object
properties

Raster file properties
rasterFromCells

Subset a raster by cell numbers
rasterToContour

Raster to contour lines conversion
nlayers

Number of layers
reclassify

Reclassify
persp

Perspective plot
rowFromCell

Row or column number from a cell number
select

Geometric subsetting
extent

Extent
rotated

Do the raster cells have a rotation?
layerize

Layerize