Learn R Programming

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

raster (version 3.6-14)

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

138,294

Version

3.6-14

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

January 16th, 2023

Functions in raster (3.6-14)

Summary-methods

Summary methods
approxNA

Estimate values for cell values that are NA by interpolating between layers
as.character

Character representation of a Raster or Extent object
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
area

Size of cells
atan2

Two argument arc-tangent
as.logical

Change cell values to logical or integer values
as.list

Create a list of RasterLayer objects
alignExtent

Align an extent (object of class Extent)
bands

Number of bands
barplot

Bar plot of a RasterLayer
boxplot

Box plot of Raster objects
adjacent

Adjacent cells
clamp

Clamp values
bind

Bind Spatial* objects
animate

Animate layers of a Raster* object
blockSize

Block size for writing files
aggregate

Aggregate raster cells or SpatialPolygons/Lines
boundaries

boundaries (edges) detection
autocorrelation

Spatial autocorrelation
calc

Calculate
Extreme coordinates

Coordinates of the Extent of a Raster object
clearValues

Clear values
contour

Contour plot
density

Density plot
dim

Dimensions of a Raster* object
as.matrix

Get a vector, matrix, or array with raster cell values
cellFrom

Get cell, row, or column number
compareRaster

Compare Raster objects
cellStats

Statistics across cells
cluster

Use a multi-core cluster
cellsFromExtent

Cells from extent, and vice versa
filledContour

Filled contour plot
filename

Filename
colortable

colortable
direction

Direction
click

Query by clicking on a map
clump

Detect clumps
crop

Crop
crosstab

Cross-tabulate
extension

Filename extensions
extent

Extent
getValues

Get raster cell values
draw

Draw a line or polygon
drawExtent

Create an Extent object by drawing on a map
as.raster

Coerce to a 'raster' object
getValuesBlock

Get a block of raster cell values
buffer

buffer
brick

Create a RasterBrick object
freq

Frequency table
geom

Get the coordinates of a vector type Spatial* object
disaggregate

Disaggregate
getData

Get geographic data
initialize

Initialize a Raster object with values
nlayers

Number of layers
Gain and offset

Gain and offset of values on file
extract

Extract values from Raster objects
dataType

Data type
compareCRS

Partially compare two CRS objects
origin

Origin
datasource

Are values in memory and/or on disk?
Extract by index

Indexing to extract values of a Raster* object
localFun

Local functions
mask

Mask values in a Raster object
match

Value matching for Raster* objects
corLocal

Local correlation coefficient
flip

Flip
merge

Merge Raster* objects
predict

Spatial model predictions
flowPath

Flow path
distance

Distance
distanceFromPoints

Distance from points
raster-package

Overview of the functions in the raster package
interpolate

Interpolate
extremeValues

Minimum and maximum values
factors

Factors
cover

Replace NA values with values of other layers
raster

Create a RasterLayer object
cut

Convert values to classes
hillShade

Hill shading
Programming

Helper functions for programming
cv

Coefficient of variation
properties

Raster file properties
hdr

Header files
hist

Histogram
persp

Perspective plot
quantile

Raster quantiles
plot

Plot a Raster* object
erase

extend

Extend
layerStats

Correlation and (weighted) covariance
head

Show the head or tail of a Raster* object
Summary

Summary
readAll

Read values from disk
intersect

Intersect
SampleInt

Sample integer values
resolution

Resolution
resample

Resample a Raster object
isLonLat

Is this longitude/latitude data?
layerize

Layerize
symdif

Symetrical difference
mosaic

Merge Raster* objects using a function for overlapping areas
movingFun

Moving functions
ncell

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

Names of raster layers
projectRaster

Project a Raster object
reclassify

Reclassify
projection

Get or set a coordinate reference system (projection)
focal

Focal values
spEasy

Create SpatialLines* or SpatialPolygons*
rowFromCell

Row or column number from a cell number
sampleRandom

Random sample
union

Union Extent or SpatialPolygons* objects
unique

Unique values
terrain

Terrain characteristics
spplot

Use spplot to plot a Raster* or other object
Options

Global options for the raster package
rasterTmpFile

Temporary files
rowSums

rowSums and colSums for Raster objects
rotate

Rotate
setValues

Set values of a Raster object
weighted.mean

Weighted mean of rasters
shapefile

Read or write a shapefile
which

Which cells are TRUE?
text

Add labels to a map
stackSave

Save or open a RasterStack file
scale

Scale values
rotated

Do the raster cells have a rotation?
overlay

Overlay Raster objects
focalWeight

Focal weights matrix
pairs

Pairs plot (matrix of scatterplots)
rasterToContour

Raster to contour lines conversion
rasterToPoints

Raster to points conversion
rasterToPolygons

Raster to polygons conversion
scalebar

scalebar
select

Geometric subsetting
which.min

Where is the min or max value?
writeFormats

File types for writing
rasterize

Rasterize points, lines, or polygons
getValuesFocal

Get focal raster cell values
stackSelect

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

Transpose
sampleRegular

Regular sample
gridDistance

Distance on a grid
image

Image
trim

Trim
writeRaster

Write raster data to a file
sampleStratified

Stratified random sample
stretch

Stretch
unstack

Unstack
setExtent

Set the extent of a RasterLayer
inifile

Read a .ini file
writeValues

Write values to a file
zonal

Zonal statistics
update

Update raster cells of files (on disk)
setMinMax

Compute min and max values
stack

Create a RasterStack object
metadata

Metadata
zoom

Zoom in on a map
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
modal

modal value
plotRGB

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

z (time) apply
xyFromCell

Coordinates from a row, column or cell number
pointDistance

Distance between points
rasterFromCells

Subset a raster by cell numbers
rectify

rectify a Raster object
rasterFromXYZ

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

Replace cell values or layers of a Raster* object
round

Integer values
Extent math

round Extent coordinates
shift

Shift
Slope and aspect

Slope and aspect
substitute

Substitute values in a Raster* object
subset

Subset layers in a Raster* object
validCell

Validity of a cell, column or row number
validNames

Create valid names
z-values

Get or set z-values
Logic-methods

Logical operators and functions
Arith-methods

Arithmetic with Raster* objects
Extent-class

Class "Extent"
Raster-class

Raster* classes
NAvalue

Set the NA value of a RasterLayer
Compare-methods

Compare Raster* objects
Math-methods

Mathematical functions
Rcpp-class

Rcpp classes
KML

Write a KML or KMZ file
RGB

Create a Red-Green-Blue Raster object