Learn R Programming

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

raster (version 3.6-23)

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

109,462

Version

3.6-23

License

GPL (>= 3)

Maintainer

Last Published

July 4th, 2023

Functions in raster (3.6-23)

as.character

Character representation of a Raster or Extent object
animate

Animate layers of a Raster* object
alignExtent

Align an extent (object of class Extent)
adjacent

Adjacent cells
area

Size of cells
as.data.frame

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

Add or drop a layer
approxNA

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

Number of bands
Summary-methods

Summary methods
aggregate

Aggregate raster cells or SpatialPolygons/Lines
bind

Bind Spatial* objects
as.matrix

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

Create a list of RasterLayer objects
barplot

Bar plot of a RasterLayer
as.raster

Coerce to a 'raster' object
atan2

Two argument arc-tangent
autocorrelation

Spatial autocorrelation
cellsFromExtent

Cells from extent, and vice versa
cellStats

Statistics across cells
boundaries

boundaries (edges) detection
as.logical

Change cell values to logical or integer values
clamp

Clamp values
click

Query by clicking on a map
compareRaster

Compare Raster objects
buffer

buffer
cellFrom

Get cell, row, or column number
cover

Replace NA values with values of other layers
clearValues

Clear values
blockSize

Block size for writing files
crop

Crop
boxplot

Box plot of Raster objects
clump

Detect clumps
calc

Calculate
corLocal

Local correlation coefficient
brick

Create a RasterBrick object
compareCRS

Partially compare two CRS objects
erase

extremeValues

Minimum and maximum values
direction

Direction
extend

Extend
Extreme coordinates

Coordinates of the Extent of a Raster object
contour

Contour plot
cut

Convert values to classes
disaggregate

Disaggregate
Extract by index

Indexing to extract values of a Raster* object
extract

Extract values from Raster objects
cv

Coefficient of variation
cluster

Use a multi-core cluster
factors

Factors
datasource

Are values in memory and/or on disk?
dataType

Data type
colortable

colortable
density

Density plot
geom

Get the coordinates of a vector type Spatial* object
crosstab

Cross-tabulate
distance

Distance
dim

Dimensions of a Raster* object
filename

Filename
draw

Draw a line or polygon
getData

Get geographic data
extension

Filename extensions
filledContour

Filled contour plot
drawExtent

Create an Extent object by drawing on a map
flip

Flip
extent

Extent
intersect

Intersect
distanceFromPoints

Distance from points
focalWeight

Focal weights matrix
focal

Focal values
getValues

Get raster cell values
getValuesBlock

Get a block of raster cell values
hillShade

Hill shading
freq

Frequency table
isLonLat

Is this longitude/latitude data?
initialize

Initialize a Raster object with values
hist

Histogram
origin

Origin
nlayers

Number of layers
interpolate

Interpolate
layerStats

Correlation and (weighted) covariance
pairs

Pairs plot (matrix of scatterplots)
overlay

Overlay Raster objects
image

Image
inifile

Read a .ini file
Gain and offset

Gain and offset of values on file
mosaic

Merge Raster* objects using a function for overlapping areas
getValuesFocal

Get focal raster cell values
gridDistance

Distance on a grid
movingFun

Moving functions
flowPath

Flow path
persp

Perspective plot
rasterFromCells

Subset a raster by cell numbers
rasterFromXYZ

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

Plot a Raster* object
predict

Spatial model predictions
readAll

Read values from disk
Options

Global options for the raster package
reclassify

Reclassify
rasterTmpFile

Temporary files
stackSave

Save or open a RasterStack file
scale

Scale values
rotate

Rotate
layerize

Layerize
names

Names of raster layers
rotated

Do the raster cells have a rotation?
setValues

Set values of a Raster object
hdr

Header files
localFun

Local functions
Programming

Helper functions for programming
rowFromCell

Row or column number from a cell number
shapefile

Read or write a shapefile
mask

Mask values in a Raster object
stackSelect

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

Stretch
head

Show the head or tail of a Raster* object
match

Value matching for Raster* objects
rowSums

rowSums and colSums for Raster objects
merge

Merge Raster* objects
ncell

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

Project a Raster object
weighted.mean

Weighted mean of rasters
rasterToContour

Raster to contour lines conversion
which

Which cells are TRUE?
substitute

Substitute values in a Raster* object
projection

Get or set a coordinate reference system (projection)
which.min

Where is the min or max value?
writeFormats

File types for writing
rasterToPoints

Raster to points conversion
metadata

Metadata
subset

Subset layers in a Raster* object
modal

modal value
validCell

Validity of a cell, column or row number
rectify

rectify a Raster object
replacement

Replace cell values or layers of a Raster* object
plotRGB

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

Distance between points
round

Integer values
Extent math

round Extent coordinates
rasterToPolygons

Raster to polygons conversion
shift

Shift
Slope and aspect

Slope and aspect
stack

Create a RasterStack object
raster-package

Overview of the functions in the raster package
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
validNames

Create valid names
raster

Create a RasterLayer object
resample

Resample a Raster object
properties

Raster file properties
rasterize

Rasterize points, lines, or polygons
zoom

Zoom in on a map
zonal

Zonal statistics
quantile

Raster quantiles
unstack

Unstack
update

Update raster cells of files (on disk)
scalebar

scalebar
select

Geometric subsetting
union

Union Extent or SpatialPolygons* objects
unique

Unique values
resolution

Resolution
sampleRegular

Regular sample
SampleInt

Sample integer values
sampleRandom

Random sample
setExtent

Set the extent of a RasterLayer
sampleStratified

Stratified random sample
spEasy

Create SpatialLines* or SpatialPolygons*
setMinMax

Compute min and max values
xyFromCell

Coordinates from a row, column or cell number
Summary

Summary
spplot

Use spplot to plot a Raster* or other object
symdif

Symetrical difference
zApply

z (time) apply
terrain

Terrain characteristics
text

Add labels to a map
transpose

Transpose
trim

Trim
z-values

Get or set z-values
writeRaster

Write raster data to a file
writeValues

Write values to a file
RGB

Create a Red-Green-Blue Raster object
NAvalue

Set the NA value of a RasterLayer
Extent-class

Class "Extent"
Logic-methods

Logical operators and functions
Arith-methods

Arithmetic with Raster* objects
Math-methods

Mathematical functions
Raster-class

Raster* classes
Rcpp-class

Rcpp classes
KML

Write a KML or KMZ file
Compare-methods

Compare Raster* objects