Learn R Programming

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

raster (version 3.6-26)

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-26

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 14th, 2023

Functions in raster (3.6-26)

animate

Animate layers of a Raster* object
bind

Bind Spatial* objects
as.matrix

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

Create a list of RasterLayer objects
cellsFromExtent

Cells from extent, and vice versa
as.logical

Change cell values to logical or integer values
brick

Create a RasterBrick object
bands

Number of bands
as.raster

Coerce to a 'raster' object
barplot

Bar plot of a RasterLayer
cellFrom

Get cell, row, or column number
clamp

Clamp values
blockSize

Block size for writing files
atan2

Two argument arc-tangent
boundaries

boundaries (edges) detection
cellStats

Statistics across cells
autocorrelation

Spatial autocorrelation
buffer

buffer
boxplot

Box plot of Raster objects
clearValues

Clear values
contour

Contour plot
cluster

Use a multi-core cluster
Extreme coordinates

Coordinates of the Extent of a Raster object
colortable

colortable
dim

Dimensions of a Raster* object
compareRaster

Compare Raster objects
density

Density plot
calc

Calculate
click

Query by clicking on a map
crop

Crop
extend

Extend
extension

Filename extensions
compareCRS

Partially compare two CRS objects
extent

Extent
crosstab

Cross-tabulate
erase

draw

Draw a line or polygon
freq

Frequency table
Gain and offset

Gain and offset of values on file
drawExtent

Create an Extent object by drawing on a map
filename

Filename
geom

Get the coordinates of a vector type Spatial* object
filledContour

Filled contour plot
direction

Direction
disaggregate

Disaggregate
clump

Detect clumps
getData

Get geographic data
Extract by index

Indexing to extract values of a Raster* object
extract

Extract values from Raster objects
focal

Focal values
hillShade

Hill shading
cut

Convert values to classes
focalWeight

Focal weights matrix
hdr

Header files
head

Show the head or tail of a Raster* object
corLocal

Local correlation coefficient
dataType

Data type
cv

Coefficient of variation
hist

Histogram
cover

Replace NA values with values of other layers
datasource

Are values in memory and/or on disk?
layerize

Layerize
initialize

Initialize a Raster object with values
layerStats

Correlation and (weighted) covariance
interpolate

Interpolate
mosaic

Merge Raster* objects using a function for overlapping areas
nlayers

Number of layers
origin

Origin
extremeValues

Minimum and maximum values
metadata

Metadata
distance

Distance
localFun

Local functions
mask

Mask values in a Raster object
overlay

Overlay Raster objects
factors

Factors
getValuesFocal

Get focal raster cell values
modal

modal value
pairs

Pairs plot (matrix of scatterplots)
gridDistance

Distance on a grid
persp

Perspective plot
plot

Plot a Raster* object
image

Image
distanceFromPoints

Distance from points
projectRaster

Project a Raster object
projection

Get or set a coordinate reference system (projection)
inifile

Read a .ini file
raster-package

Overview of the functions in the raster package
flip

Flip
readAll

Read values from disk
reclassify

Reclassify
Options

Global options for the raster package
round

Integer values
match

Value matching for Raster* objects
merge

Merge Raster* objects
Extent math

round Extent coordinates
rasterTmpFile

Temporary files
spEasy

Create SpatialLines* or SpatialPolygons*
flowPath

Flow path
raster

Create a RasterLayer object
getValues

Get raster cell values
rasterToPolygons

Raster to polygons conversion
rasterize

Rasterize points, lines, or polygons
movingFun

Moving functions
sampleRegular

Regular sample
plotRGB

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

Use spplot to plot a Raster* or other object
sampleStratified

Stratified random sample
setExtent

Set the extent of a RasterLayer
getValuesBlock

Get a block of raster cell values
substitute

Substitute values in a Raster* object
setMinMax

Compute min and max values
intersect

Intersect
stackSave

Save or open a RasterStack file
scale

Scale values
terrain

Terrain characteristics
rasterFromCells

Subset a raster by cell numbers
text

Add labels to a map
setValues

Set values of a Raster object
names

Names of raster layers
isLonLat

Is this longitude/latitude data?
rasterFromXYZ

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

Distance between points
ncell

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

Union Extent or SpatialPolygons* objects
xyFromCell

Coordinates from a row, column or cell number
shapefile

Read or write a shapefile
rasterToContour

Raster to contour lines conversion
unique

Unique values
rasterToPoints

Raster to points conversion
predict

Spatial model predictions
subset

Subset layers in a Raster* object
resample

Resample a Raster object
zApply

z (time) apply
rectify

rectify a Raster object
replacement

Replace cell values or layers of a Raster* object
resolution

Resolution
validCell

Validity of a cell, column or row number
transpose

Transpose
SampleInt

Sample integer values
Programming

Helper functions for programming
validNames

Create valid names
shift

Shift
writeRaster

Write raster data to a file
properties

Raster file properties
writeValues

Write values to a file
trim

Trim
quantile

Raster quantiles
z-values

Get or set z-values
Slope and aspect

Slope and aspect
stack

Create a RasterStack object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
sampleRandom

Random sample
rotate

Rotate
Summary

Summary
rotated

Do the raster cells have a rotation?
unstack

Unstack
rowFromCell

Row or column number from a cell number
rowSums

rowSums and colSums for Raster objects
select

Geometric subsetting
scalebar

scalebar
update

Update raster cells of files (on disk)
symdif

Symetrical difference
weighted.mean

Weighted mean of rasters
which

Which cells are TRUE?
zoom

Zoom in on a map
zonal

Zonal statistics
stackSelect

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

Stretch
which.min

Where is the min or max value?
writeFormats

File types for writing
Raster-class

Raster* classes
Rcpp-class

Rcpp classes
KML

Write a KML or KMZ file
Arith-methods

Arithmetic with Raster* objects
Compare-methods

Compare Raster* objects
Extent-class

Class "Extent"
NAvalue

Set the NA value of a RasterLayer
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
approxNA

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

Adjacent cells
RGB

Create a Red-Green-Blue Raster object
as.character

Character representation of a Raster or Extent object
aggregate

Aggregate raster cells or SpatialPolygons/Lines
addLayer

Add or drop a layer
Summary-methods

Summary methods
alignExtent

Align an extent (object of class Extent)
as.data.frame

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

Size of cells