Rdocumentation
powered by
Learn R Programming
raster (version 3.6-32)
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
Link to current version
Version
Version
3.6-32
3.6-31
3.6-30
3.6-26
3.6-23
3.6-20
3.6-14
3.6-13
3.6-11
3.6-3
3.5-29
3.5-21
3.5-15
3.5-11
3.5-9
3.5-2
3.4-13
3.4-10
3.4-5
3.3-13
3.3-7
3.3-6
3.1-5
3.0-12
3.0-7
3.0-2
2.9-23
2.9-22
2.9-5
2.8-19
2.8-4
2.7-15
2.6-7
2.5-8
2.5-2
2.4-30
2.4-20
2.4-18
2.4-15
2.3-40
2.3-33
2.3-24
2.3-12
2.3-10
2.3-0
2.2-31
2.2-12
2.2-5
2.1-66
2.1-49
2.1-48
2.1-41
2.1-37
2.1-25
2.1-16
2.1-12
2.0-41
2.0-31
2.0-29
2.0-12
2.0-08
2.0-05
2.0-04
1.9-92
1.9-82
1.9-70
1.9-67
1.9-64
1.9-63
1.9-58
1.9-55
1.9-54
1.9-52
1.9-46
1.9-44
1.9-41
1.9-33
1.9-32
1.9-29
1.9-27
1.9-19
1.9-13
1.9-12
1.9-11
1.9-5
1.9-1
1.8-39
1.8-38
1.8-35
1.8-31
1.8-27
1.8-25
1.8-22
1.8-20
1.8-12
1.8-9
1.8-3
1.7-46
1.7-29
1.7-23
1.7-18
1.7-8
1.7-6
1.6-22
1.6-19
1.6-16
1.6-15
1.6-10
1.5-16
1.5-8
1.4-10
1.3-11
1.3-4
1.3-1
1.2-6
1.1.7
1.0.4
1.0.0-1
Install
install.packages('raster')
Monthly Downloads
138,294
Version
3.6-32
License
GPL (>= 3)
Maintainer
Robert Hijmans
Last Published
March 28th, 2025
Functions in raster (3.6-32)
Search all functions
approxNA
Estimate values for cell values that are
NA
by interpolating between layers
adjacent
Adjacent cells
addLayer
Add or drop a layer
as.character
Character representation of a Raster or Extent object
bands
Number of bands
animate
Animate layers of a Raster* object
aggregate
Aggregate raster cells or SpatialPolygons/Lines
atan2
Two argument arc-tangent
as.data.frame
Get a data.frame with raster cell values, or coerce SpatialPolygons, Lines, or Points to a data.frame
as.logical
Change cell values to logical or integer values
as.list
Create a list of RasterLayer objects
boundaries
boundaries (edges) detection
clamp
Clamp values
autocorrelation
Spatial autocorrelation
clearValues
Clear values
calc
Calculate
area
Size of cells
cellFrom
Get cell, row, or column number
click
Query by clicking on a map
blockSize
Block size for writing files
as.raster
Coerce to a 'raster' object
as.matrix
Get a vector, matrix, or array with raster cell values
barplot
Bar plot of a RasterLayer
compareRaster
Compare Raster objects
bind
Bind Spatial* objects
cut
Convert values to classes
buffer
buffer
brick
Create a RasterBrick object
corLocal
Local correlation coefficient
compareCRS
Partially compare two CRS objects
cover
Replace NA values with values of other layers
direction
Direction
cv
Coefficient of variation
cellStats
Statistics across cells
extension
Filename extensions
extent
Extent
clump
Detect clumps
filename
Filename
boxplot
Box plot of Raster objects
cellsFromExtent
Cells from extent, and vice versa
hdr
Header files
filledContour
Filled contour plot
crop
Crop
crosstab
Cross-tabulate
contour
Contour plot
head
Show the head or tail of a Raster* object
erase
Erase parts of a SpatialPolygons* or SpatialLines* object. The inverse of this can be done with
intersect
disaggregate
Disaggregate
extract
Extract values from Raster objects
extend
Extend
dim
Dimensions of a Raster* object
density
Density plot
Extreme coordinates
Coordinates of the Extent of a Raster object
dataType
Data type
flip
Flip
cluster
Use a multi-core cluster
colortable
colortable
draw
Draw a line or polygon
Extract by index
Indexing to extract values of a Raster* object
intersect
Intersect
image
Image
isLonLat
Is this longitude/latitude data?
match
Value matching for Raster* objects
focal
Focal values
drawExtent
Create an Extent object by drawing on a map
merge
Merge Raster* objects
inifile
Read a .ini file
rasterToContour
Raster to contour lines conversion
rasterToPoints
Raster to points conversion
focalWeight
Focal weights matrix
getValues
Get raster cell values
freq
Frequency table
datasource
Are values in memory and/or on disk?
distance
Distance
sampleRandom
Random sample
SampleInt
Sample integer values
Gain and offset
Gain and offset of values on file
flowPath
Flow path
setExtent
Set the extent of a RasterLayer
getValuesFocal
Get focal raster cell values
hillShade
Hill shading
initialize
Initialize a Raster object with values
hist
Histogram
gridDistance
Distance on a grid
setMinMax
Compute min and max values
getValuesBlock
Get a block of raster cell values
plotRGB
Red-Green-Blue plot of a multi-layered Raster object
interpolate
Interpolate
metadata
Metadata
modal
modal value
pointDistance
Distance between points
names
Names of raster layers
Options
Global options for the raster package
rasterTmpFile
Temporary files
Summary
Summary
localFun
Local functions
symdif
Symetrical difference
unstack
Unstack
update
Update raster cells of files (on disk)
predict
Spatial model predictions
ncell
Number or rows, columns, and cells of a Raster* object
mask
Mask values in a Raster object
writeRaster
Write raster data to a file
writeValues
Write values to a file
Programming
Helper functions for programming
mosaic
Merge Raster* objects using a function for overlapping areas
projectRaster
Project a Raster object
properties
Raster file properties
rasterToPolygons
Raster to polygons conversion
movingFun
Moving functions
persp
Perspective plot
rasterize
Rasterize points, lines, or polygons
quantile
Raster quantiles
rectify
rectify a Raster object
stackSave
Save or open a RasterStack file
scale
Scale values
replacement
Replace cell values or layers of a Raster* object
substitute
Substitute values in a Raster* object
round
Integer values
distanceFromPoints
Distance from points
extremeValues
Minimum and maximum values
factors
Factors
Extent math
round Extent coordinates
subset
Subset layers in a Raster* object
plot
Plot a Raster* object
spEasy
Create SpatialLines* or SpatialPolygons*
geom
Get the coordinates of a vector type Spatial* object
resample
Resample a Raster object
getData
Get geographic data
projection
Get or set a coordinate reference system (projection)
layerStats
Correlation and (weighted) covariance
raster-package
Overview of the functions in the raster package
layerize
Layerize
raster
Create a RasterLayer object
rotate
Rotate
rotated
Do the raster cells have a rotation?
rowFromCell
Row or column number from a cell number
resolution
Resolution
spplot
Use spplot to plot a Raster* or other object
sampleRegular
Regular sample
rowSums
rowSums and colSums for Raster objects
nlayers
Number of layers
stackSelect
Select cell values from a multi-layer Raster* object
setValues
Set values of a Raster object
shapefile
Read or write a shapefile
sampleStratified
Stratified random sample
stack
Create a RasterStack object
shift
Shift
origin
Origin
Slope and aspect
Slope and aspect
terrain
Terrain characteristics
stackApply
Apply a function on subsets of a RasterStack or RasterBrick
text
Add labels to a map
transpose
Transpose
trim
Trim
stretch
Stretch
union
Union Extent or SpatialPolygons* objects
unique
Unique values
overlay
Overlay Raster objects
weighted.mean
Weighted mean of rasters
which
Which cells are TRUE?
pairs
Pairs plot (matrix of scatterplots)
rasterFromCells
Subset a raster by cell numbers
which.min
Where is the min or max value?
zonal
Zonal statistics
writeFormats
File types for writing
rasterFromXYZ
Create a Raster* object from x, y, z values
z-values
Get or set z-values
zoom
Zoom in on a map
readAll
Read values from disk
reclassify
Reclassify
scalebar
scalebar
select
Geometric subsetting
validCell
Validity of a cell, column or row number
validNames
Create valid names
xyFromCell
Coordinates from a row, column or cell number
zApply
z (time) apply
Raster-class
Raster* classes
NAvalue
Set the NA value of a RasterLayer
KML
Write a KML or KMZ file
RGB
Create a Red-Green-Blue Raster object
Math-methods
Mathematical functions
Arith-methods
Arithmetic with Raster* objects
Extent-class
Class "Extent"
Compare-methods
Compare Raster* objects
Rcpp-class
Rcpp classes
Logic-methods
Logical operators and functions
alignExtent
Align an extent (object of class Extent)
Summary-methods
Summary methods