Learn R Programming

raster (version 3.6-31)

Geographic Data Analysis and Modeling

Description

Reading, writing, manipulating, analyzing and modeling of spatial data. This package has been superseded by the "terra" package .

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

115,676

Version

3.6-31

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

January 16th, 2025

Functions in raster (3.6-31)

Extent-class

Class "Extent"
Raster-class

Raster* classes
as.character

Character representation of a Raster or Extent object
adjacent

Adjacent cells
as.data.frame

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

Arithmetic with Raster* objects
Compare-methods

Compare Raster* objects
approxNA

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

Aggregate raster cells or SpatialPolygons/Lines
as.list

Create a list of RasterLayer objects
Rcpp-class

Rcpp classes
Logic-methods

Logical operators and functions
NAvalue

Set the NA value of a RasterLayer
RGB

Create a Red-Green-Blue Raster object
alignExtent

Align an extent (object of class Extent)
as.logical

Change cell values to logical or integer values
as.matrix

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

Coerce to a 'raster' object
Math-methods

Mathematical functions
area

Size of cells
bind

Bind Spatial* objects
boundaries

boundaries (edges) detection
blockSize

Block size for writing files
animate

Animate layers of a Raster* object
Summary-methods

Summary methods
boxplot

Box plot of Raster objects
addLayer

Add or drop a layer
cellStats

Statistics across cells
atan2

Two argument arc-tangent
bands

Number of bands
autocorrelation

Spatial autocorrelation
calc

Calculate
cellsFromExtent

Cells from extent, and vice versa
cellFrom

Get cell, row, or column number
barplot

Bar plot of a RasterLayer
clamp

Clamp values
compareRaster

Compare Raster objects
contour

Contour plot
clearValues

Clear values
click

Query by clicking on a map
Extreme coordinates

Coordinates of the Extent of a Raster object
cluster

Use a multi-core cluster
clump

Detect clumps
compareCRS

Partially compare two CRS objects
colortable

colortable
crop

Crop
brick

Create a RasterBrick object
dataType

Data type
buffer

buffer
density

Density plot
cut

Convert values to classes
cv

Coefficient of variation
crosstab

Cross-tabulate
extract

Extract values from Raster objects
datasource

Are values in memory and/or on disk?
dim

Dimensions of a Raster* object
draw

Draw a line or polygon
Extract by index

Indexing to extract values of a Raster* object
factors

Factors
extremeValues

Minimum and maximum values
extension

Filename extensions
corLocal

Local correlation coefficient
cover

Replace NA values with values of other layers
flip

Flip
hillShade

Hill shading
flowPath

Flow path
drawExtent

Create an Extent object by drawing on a map
hdr

Header files
hist

Histogram
focal

Focal values
extent

Extent
erase

filename

Filename
head

Show the head or tail of a Raster* object
image

Image
direction

Direction
initialize

Initialize a Raster object with values
extend

Extend
interpolate

Interpolate
mosaic

Merge Raster* objects using a function for overlapping areas
filledContour

Filled contour plot
disaggregate

Disaggregate
inifile

Read a .ini file
getValuesFocal

Get focal raster cell values
focalWeight

Focal weights matrix
metadata

Metadata
geom

Get the coordinates of a vector type Spatial* object
movingFun

Moving functions
projectRaster

Project a Raster object
projection

Get or set a coordinate reference system (projection)
gridDistance

Distance on a grid
modal

modal value
getData

Get geographic data
rasterFromCells

Subset a raster by cell numbers
nlayers

Number of layers
origin

Origin
overlay

Overlay Raster objects
getValues

Get raster cell values
pairs

Pairs plot (matrix of scatterplots)
rotate

Rotate
Options

Global options for the raster package
distance

Distance
rasterFromXYZ

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

Set values of a Raster object
rasterTmpFile

Temporary files
shapefile

Read or write a shapefile
rectify

rectify a Raster object
rotated

Do the raster cells have a rotation?
stackSave

Save or open a RasterStack file
distanceFromPoints

Distance from points
scale

Scale values
replacement

Replace cell values or layers of a Raster* object
freq

Frequency table
SampleInt

Sample integer values
Gain and offset

Gain and offset of values on file
getValuesBlock

Get a block of raster cell values
localFun

Local functions
mask

Mask values in a Raster object
intersect

Intersect
sampleRandom

Random sample
shift

Shift
match

Value matching for Raster* objects
Summary

Summary
Slope and aspect

Slope and aspect
layerStats

Correlation and (weighted) covariance
isLonLat

Is this longitude/latitude data?
symdif

Symetrical difference
stackSelect

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

Layerize
merge

Merge Raster* objects
stretch

Stretch
plotRGB

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

Transpose
names

Names of raster layers
trim

Trim
pointDistance

Distance between points
ncell

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

Spatial model predictions
properties

Raster file properties
persp

Perspective plot
validCell

Validity of a cell, column or row number
plot

Plot a Raster* object
quantile

Raster quantiles
readAll

Read values from disk
Programming

Helper functions for programming
reclassify

Reclassify
round

Integer values
Extent math

round Extent coordinates
rasterToContour

Raster to contour lines conversion
raster-package

Overview of the functions in the raster package
setExtent

Set the extent of a RasterLayer
raster

Create a RasterLayer object
validNames

Create valid names
rasterToPoints

Raster to points conversion
zonal

Zonal statistics
rasterToPolygons

Raster to polygons conversion
setMinMax

Compute min and max values
zoom

Zoom in on a map
rasterize

Rasterize points, lines, or polygons
terrain

Terrain characteristics
text

Add labels to a map
sampleRegular

Regular sample
sampleStratified

Stratified random sample
scalebar

scalebar
select

Geometric subsetting
union

Union Extent or SpatialPolygons* objects
substitute

Substitute values in a Raster* object
resample

Resample a Raster object
resolution

Resolution
unique

Unique values
subset

Subset layers in a Raster* object
rowFromCell

Row or column number from a cell number
rowSums

rowSums and colSums for Raster objects
z-values

Get or set z-values
writeRaster

Write raster data to a file
spEasy

Create SpatialLines* or SpatialPolygons*
spplot

Use spplot to plot a Raster* or other object
writeValues

Write values to a file
unstack

Unstack
update

Update raster cells of files (on disk)
stack

Create a RasterStack object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
weighted.mean

Weighted mean of rasters
xyFromCell

Coordinates from a row, column or cell number
which

Which cells are TRUE?
which.min

Where is the min or max value?
writeFormats

File types for writing
zApply

z (time) apply
KML

Write a KML or KMZ file