Learn R Programming

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

raster (version 3.3-13)

Geographic Data Analysis and Modeling

Description

Reading, writing, manipulating, analyzing and modeling of spatial data. The package implements basic and high-level functions for raster data and for vector data operations such as intersections. See the manual and tutorials on to get started.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

171,298

Version

3.3-13

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

July 17th, 2020

Functions in raster (3.3-13)

bind

Bind Spatial* objects
blockSize

Block size for writing files
click

Query by clicking on a map
direction

Direction
approxNA

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

Disaggregate
alignExtent

Align an extent (object of class Extent)
boxplot

Box plot of Raster objects
clump

Detect clumps
brick

Create a RasterBrick object
boundaries

boundaries (edges) detection
Summary-methods

Summary methods
animate

Animate layers of a Raster* object
area

Size of cells
buffer

buffer
extend

Extend
erase

RGB

Create a Red-Green-Blue Raster object
Compare-methods

Compare Raster* objects
as.data.frame

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

Character representation of a Raster or Extent object
freq

Frequency table
as.logical

Change cell values to logical or integer values
addLayer

Add or drop a layer
as.list

Create a list of RasterLayer objects
adjacent

Adjacent cells
bands

Number of bands
as.matrix

Get a vector, matrix, or array with raster cell values
as.raster

Coerce to a 'raster' object
Gain and offset

Gain and offset of values on file
cellsFromExtent

Cells from extent, and vice versa
aggregate

Aggregate raster cells or SpatialPolygons/Lines
cellStats

Statistics across cells
atan2

Two argument arc-tangent
autocorrelation

Spatial autocorrelation
hillShade

Hill shading
barplot

Bar plot of a RasterLayer
clearValues

Clear values
hist

Histogram
calc

Calculate
clamp

Clamp values
crop

Crop
corLocal

Local correlation coefficient
cellFrom

Get cell, row, or column number
contour

Contour plot
crosstab

Cross-tabulate
compareRaster

Compare Raster objects
Extreme coordinates

Coordinates of the Extent of a Raster object
compareCRS

Partially compare two CRS objects
dataType

Data type
cv

Coefficient of variation
cut

Convert values to classes
layerStats

Correlation and (weighted) covariance
colortable

colortable
cluster

Use a multi-core cluster
distance

Distance
distanceFromPoints

Distance from points
flip

Flip
datasource

Are values in memory and/or on disk?
draw

Draw a line or polygon
cover

Replace NA values with values of other layers
layerize

Layerize
density

Density plot
origin

Origin
nlayers

Number of layers
flowPath

Flow path
dim

Dimensions of a Raster* object
getValuesFocal

Get focal raster cell values
extract

Extract values from Raster objects
focal

Focal values
drawExtent

Create an Extent object by drawing on a map
focalWeight

Focal weights matrix
Extract by index

Indexing to extract values of a Raster* object
gridDistance

Distance on a grid
extension

Filename extensions
intersect

Intersect
isLonLat

Is this longitude/latitude data?
filename

Filename
extent

Extent
geom

Get the coordinates of a vector type Spatial* object
match

Value matching for Raster* objects
overlay

Overlay Raster objects
extremeValues

Minimum and maximum values
pairs

Pairs plot (matrix of scatterplots)
hdr

Header files
merge

Merge Raster* objects
filledContour

Filled contour plot
factors

Factors
properties

Raster file properties
quantile

Raster quantiles
head

Show the head or tail of a Raster* object
inifile

Read a .ini file
getValues

Get raster cell values
image

Image
ncell

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

Names of raster layers
getValuesBlock

Get a block of raster cell values
getData

Get geographic data
initialize

Initialize a Raster object with values
Programming

Helper functions for programming
mosaic

Merge Raster* objects using a function for overlapping areas
predict

Spatial model predictions
interpolate

Interpolate
movingFun

Moving functions
replacement

Replace cell values or layers of a Raster* object
rasterFromXYZ

Create a Raster* object from x, y, z values
rectify

rectify a Raster object
rasterFromCells

Subset a raster by cell numbers
localFun

Local functions
modal

modal value
mask

Mask values in a Raster object
reclassify

Reclassify
SampleInt

Sample integer values
metadata

Metadata
readAll

Read values from disk
Options

Global options for the raster package
pointDistance

Distance between points
rasterTmpFile

Temporary files
plotRGB

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

Project a Raster object
persp

Perspective plot
sampleStratified

Stratified random sample
projection

Get or set a coordinate reference system (projection)
sampleRandom

Random sample
plot

Plot a Raster* object
rotate

Rotate
sampleRegular

Regular sample
rasterToPolygons

Raster to polygons conversion
terrain

Terrain characteristics
rasterToPoints

Raster to points conversion
rasterize

Rasterize points, lines, or polygons
rasterToContour

Raster to contour lines conversion
rotated

Do the raster cells have a rotation?
text

Add labels to a map
scalebar

scalebar
union

Union Extent or SpatialPolygons* objects
raster-package

Overview of the functions in the raster package
stackSave

Save or open a RasterStack file
raster

Create a RasterLayer object
select

Geometric subsetting
scale

Scale values
unique

Unique values
writeValues

Write values to a file
round

Integer values
resolution

Resolution
Extent math

round Extent coordinates
setValues

Set values of a Raster object
xyFromCell

Coordinates from a row, column or cell number
resample

Resample a Raster object
writeRaster

Write raster data to a file
rowSums

rowSums and colSums for Raster objects
rowFromCell

Row or column number from a cell number
Slope and aspect

Slope and aspect
shift

Shift
shapefile

Read or write a shapefile
setExtent

Set the extent of a RasterLayer
sp

Create SpatialLines* or SpatialPolygons*
setMinMax

Compute min and max values
substitute

Substitute values in a Raster* object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
zApply

z (time) apply
spplot

Use spplot to plot a Raster* or other object
stack

Create a RasterStack object
weighted.mean

Weighted mean of rasters
subset

Subset layers in a Raster* object
which

Which cells are TRUE?
zonal

Zonal statistics
Summary

Summary
z-values

Get or set z-values
which.min

Where is the min or max value?
symdif

Symetrical difference
unstack

Unstack
stackSelect

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

Stretch
transpose

Transpose
update

Update raster cells of files (on disk)
validNames

Create valid names
trim

Trim
zoom

Zoom in on a map
validCell

Validity of a cell, column or row number
writeFormats

File types for writing
Logic-methods

Logical operators and functions
NAvalue

Set the NA value of a RasterLayer
Arith-methods

Arithmetic with Raster* objects
Extent-class

Class "Extent"
Math-methods

Mathematical functions
Raster-class

Raster* classes
KML

Write a KML or KMZ file
Rcpp-class

Rcpp classes