Learn R Programming

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

raster (version 3.5-9)

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

109,462

Version

3.5-9

License

GPL (>= 3)

Maintainer

Last Published

December 10th, 2021

Functions in raster (3.5-9)

Logic-methods

Logical operators and functions
Raster-class

Raster* classes
NAvalue

Set the NA value of a RasterLayer
Arith-methods

Arithmetic with Raster* objects
RGB

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

Mathematical functions
Compare-methods

Compare Raster* objects
Rcpp-class

Rcpp classes
KML

Write a KML or KMZ file
Extent-class

Class "Extent"
Summary-methods

Summary methods
area

Size of cells
approxNA

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

Align an extent (object of class Extent)
animate

Animate layers of a Raster* object
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
as.logical

Change cell values to logical or integer values
as.list

Create a list of RasterLayer objects
as.matrix

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

Coerce to a 'raster' object
autocorrelation

Spatial autocorrelation
atan2

Two argument arc-tangent
adjacent

Adjacent cells
cellFrom

Get cell, row, or column number
aggregate

Aggregate raster cells or SpatialPolygons/Lines
calc

Calculate
cellsFromExtent

Cells from extent, and vice versa
cellStats

Statistics across cells
clamp

Clamp values
addLayer

Add or drop a layer
bands

Number of bands
barplot

Bar plot of a RasterLayer
buffer

buffer
brick

Create a RasterBrick object
Extreme coordinates

Coordinates of the Extent of a Raster object
clearValues

Clear values
contour

Contour plot
compareCRS

Partially compare two CRS objects
compareRaster

Compare Raster objects
datasource

Are values in memory and/or on disk?
dataType

Data type
density

Density plot
extend

Extend
bind

Bind Spatial* objects
erase

boxplot

Box plot of Raster objects
direction

Direction
colortable

colortable
cluster

Use a multi-core cluster
boundaries

boundaries (edges) detection
click

Query by clicking on a map
clump

Detect clumps
getValues

Get raster cell values
cut

Convert values to classes
cv

Coefficient of variation
draw

Draw a line or polygon
dim

Dimensions of a Raster* object
disaggregate

Disaggregate
distanceFromPoints

Distance from points
distance

Distance
blockSize

Block size for writing files
drawExtent

Create an Extent object by drawing on a map
flip

Flip
hillShade

Hill shading
corLocal

Local correlation coefficient
cover

Replace NA values with values of other layers
flowPath

Flow path
getValuesBlock

Get a block of raster cell values
crosstab

Cross-tabulate
crop

Crop
hist

Histogram
localFun

Local functions
extremeValues

Minimum and maximum values
factors

Factors
extension

Filename extensions
ncell

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

Names of raster layers
extent

Extent
mosaic

Merge Raster* objects using a function for overlapping areas
mask

Mask values in a Raster object
movingFun

Moving functions
image

Image
rasterFromXYZ

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

Subset a raster by cell numbers
rectify

rectify a Raster object
rowFromCell

Row or column number from a cell number
rowSums

rowSums and colSums for Raster objects
replacement

Replace cell values or layers of a Raster* object
focal

Focal values
shift

Shift
focalWeight

Focal weights matrix
extract

Extract values from Raster objects
Extract by index

Indexing to extract values of a Raster* object
Slope and aspect

Slope and aspect
hdr

Header files
filename

Filename
filledContour

Filled contour plot
union

Union Extent or SpatialPolygons* objects
projection

Get or set a coordinate reference system (projection)
subset

Subset layers in a Raster* object
projectRaster

Project a Raster object
substitute

Substitute values in a Raster* object
unique

Unique values
z-values

Get or set z-values
sampleRandom

Random sample
validNames

Create valid names
writeFormats

File types for writing
SampleInt

Sample integer values
which.min

Where is the min or max value?
validCell

Validity of a cell, column or row number
Summary

Summary
symdif

Symetrical difference
head

Show the head or tail of a Raster* object
geom

Get the coordinates of a vector type Spatial* object
getData

Get geographic data
inifile

Read a .ini file
initialize

Initialize a Raster object with values
interpolate

Interpolate
layerStats

Correlation and (weighted) covariance
layerize

Layerize
metadata

Metadata
match

Value matching for Raster* objects
modal

modal value
merge

Merge Raster* objects
freq

Frequency table
Gain and offset

Gain and offset of values on file
gridDistance

Distance on a grid
getValuesFocal

Get focal raster cell values
plotRGB

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

Helper functions for programming
persp

Perspective plot
rasterToPolygons

Raster to polygons conversion
properties

Raster file properties
predict

Spatial model predictions
quantile

Raster quantiles
isLonLat

Is this longitude/latitude data?
stackSave

Save or open a RasterStack file
scale

Scale values
intersect

Intersect
plot

Plot a Raster* object
rasterize

Rasterize points, lines, or polygons
origin

Origin
nlayers

Number of layers
Options

Global options for the raster package
setValues

Set values of a Raster object
rotate

Rotate
shapefile

Read or write a shapefile
rasterTmpFile

Temporary files
rasterToContour

Raster to contour lines conversion
pointDistance

Distance between points
rasterToPoints

Raster to points conversion
round

Integer values
rotated

Do the raster cells have a rotation?
pairs

Pairs plot (matrix of scatterplots)
resample

Resample a Raster object
raster-package

Overview of the functions in the raster package
overlay

Overlay Raster objects
stack

Create a RasterStack object
Extent math

round Extent coordinates
spEasy

Create SpatialLines* or SpatialPolygons*
spplot

Use spplot to plot a Raster* or other object
terrain

Terrain characteristics
xyFromCell

Coordinates from a row, column or cell number
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
reclassify

Reclassify
setExtent

Set the extent of a RasterLayer
zApply

z (time) apply
raster

Create a RasterLayer object
setMinMax

Compute min and max values
readAll

Read values from disk
weighted.mean

Weighted mean of rasters
resolution

Resolution
sampleStratified

Stratified random sample
sampleRegular

Regular sample
text

Add labels to a map
select

Geometric subsetting
scalebar

scalebar
writeRaster

Write raster data to a file
update

Update raster cells of files (on disk)
unstack

Unstack
which

Which cells are TRUE?
writeValues

Write values to a file
trim

Trim
zoom

Zoom in on a map
transpose

Transpose
zonal

Zonal statistics
stretch

Stretch
stackSelect

Select cell values from a multi-layer Raster* object