Learn R Programming

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

raster (version 3.5-2)

Geographic Data Analysis and Modeling

Description

Reading, writing, manipulating, analyzing and modeling of spatial data. The package implements basic and high-level functions for raster data and for vector data operations such as intersections. See the manual and tutorials on to get started.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

153,616

Version

3.5-2

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 11th, 2021

Functions in raster (3.5-2)

Raster-class

Raster* classes
NAvalue

Set the NA value of a RasterLayer
Extent-class

Class "Extent"
Rcpp-class

Rcpp classes
RGB

Create a Red-Green-Blue Raster object
Logic-methods

Logical operators and functions
adjacent

Adjacent cells
KML

Write a KML or KMZ file
Arith-methods

Arithmetic with Raster* objects
Compare-methods

Compare Raster* objects
approxNA

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

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

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

Animate layers of a Raster* object
Math-methods

Mathematical functions
bind

Bind Spatial* objects
as.raster

Coerce to a 'raster' object
colortable

colortable
cluster

Use a multi-core cluster
bands

Number of bands
barplot

Bar plot of a RasterLayer
as.data.frame

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

Character representation of a Raster or Extent object
as.logical

Change cell values to logical or integer values
blockSize

Block size for writing files
area

Size of cells
as.list

Create a list of RasterLayer objects
boxplot

Box plot of Raster objects
brick

Create a RasterBrick object
corLocal

Local correlation coefficient
Summary-methods

Summary methods
cellFrom

Get cell, row, or column number
compareCRS

Partially compare two CRS objects
compareRaster

Compare Raster objects
calc

Calculate
atan2

Two argument arc-tangent
boundaries

boundaries (edges) detection
direction

Direction
crop

Crop
addLayer

Add or drop a layer
cover

Replace NA values with values of other layers
autocorrelation

Spatial autocorrelation
disaggregate

Disaggregate
clamp

Clamp values
aggregate

Aggregate raster cells or SpatialPolygons/Lines
cut

Convert values to classes
buffer

buffer
contour

Contour plot
clearValues

Clear values
extent

Extent
dim

Dimensions of a Raster* object
density

Density plot
crosstab

Cross-tabulate
extract

Extract values from Raster objects
extension

Filename extensions
Extreme coordinates

Coordinates of the Extent of a Raster object
extend

Extend
geom

Get the coordinates of a vector type Spatial* object
erase

datasource

Are values in memory and/or on disk?
dataType

Data type
getData

Get geographic data
Extract by index

Indexing to extract values of a Raster* object
filename

Filename
localFun

Local functions
flowPath

Flow path
flip

Flip
cv

Coefficient of variation
cellStats

Statistics across cells
intersect

Intersect
isLonLat

Is this longitude/latitude data?
hillShade

Hill shading
focal

Focal values
focalWeight

Focal weights matrix
distance

Distance
distanceFromPoints

Distance from points
hist

Histogram
cellsFromExtent

Cells from extent, and vice versa
nlayers

Number of layers
predict

Spatial model predictions
scale

Scale values
stackSave

Save or open a RasterStack file
origin

Origin
persp

Perspective plot
mask

Mask values in a Raster object
spEasy

Create SpatialLines* or SpatialPolygons*
click

Query by clicking on a map
mosaic

Merge Raster* objects using a function for overlapping areas
filledContour

Filled contour plot
plot

Plot a Raster* object
Programming

Helper functions for programming
rasterFromCells

Subset a raster by cell numbers
rectify

rectify a Raster object
symdif

Symetrical difference
replacement

Replace cell values or layers of a Raster* object
rasterFromXYZ

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

Summary
clump

Detect clumps
spplot

Use spplot to plot a Raster* or other object
validCell

Validity of a cell, column or row number
zoom

Zoom in on a map
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
zonal

Zonal statistics
stack

Create a RasterStack object
getValues

Get raster cell values
initialize

Initialize a Raster object with values
getValuesBlock

Get a block of raster cell values
validNames

Create valid names
names

Names of raster layers
interpolate

Interpolate
movingFun

Moving functions
projection

Get or set a coordinate reference system (projection)
projectRaster

Project a Raster object
draw

Draw a line or polygon
freq

Frequency table
Options

Global options for the raster package
rasterTmpFile

Temporary files
extremeValues

Minimum and maximum values
drawExtent

Create an Extent object by drawing on a map
layerStats

Correlation and (weighted) covariance
Gain and offset

Gain and offset of values on file
layerize

Layerize
getValuesFocal

Get focal raster cell values
gridDistance

Distance on a grid
match

Value matching for Raster* objects
hdr

Header files
ncell

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

Image
head

Show the head or tail of a Raster* object
factors

Factors
inifile

Read a .ini file
properties

Raster file properties
metadata

Metadata
quantile

Raster quantiles
rotate

Rotate
plotRGB

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

Read values from disk
modal

modal value
merge

Merge Raster* objects
reclassify

Reclassify
overlay

Overlay Raster objects
pairs

Pairs plot (matrix of scatterplots)
raster-package

Overview of the functions in the raster package
rowFromCell

Row or column number from a cell number
Extent math

round Extent coordinates
resolution

Resolution
resample

Resample a Raster object
raster

Create a RasterLayer object
rowSums

rowSums and colSums for Raster objects
pointDistance

Distance between points
rotated

Do the raster cells have a rotation?
round

Integer values
shift

Shift
scalebar

scalebar
sampleRandom

Random sample
shapefile

Read or write a shapefile
SampleInt

Sample integer values
select

Geometric subsetting
weighted.mean

Weighted mean of rasters
setValues

Set values of a Raster object
z-values

Get or set z-values
which

Which cells are TRUE?
stretch

Stretch
union

Union Extent or SpatialPolygons* objects
stackSelect

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

Unique values
rasterToContour

Raster to contour lines conversion
Slope and aspect

Slope and aspect
subset

Subset layers in a Raster* object
unstack

Unstack
substitute

Substitute values in a Raster* object
xyFromCell

Coordinates from a row, column or cell number
update

Update raster cells of files (on disk)
writeValues

Write values to a file
writeRaster

Write raster data to a file
rasterToPoints

Raster to points conversion
zApply

z (time) apply
rasterToPolygons

Raster to polygons conversion
rasterize

Rasterize points, lines, or polygons
setExtent

Set the extent of a RasterLayer
sampleRegular

Regular sample
sampleStratified

Stratified random sample
terrain

Terrain characteristics
setMinMax

Compute min and max values
text

Add labels to a map
transpose

Transpose
trim

Trim
which.min

Where is the min or max value?
writeFormats

File types for writing