Learn R Programming

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

raster (version 3.4-13)

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

140,904

Version

3.4-13

License

GPL (>= 3)

Maintainer

Last Published

June 18th, 2021

Functions in raster (3.4-13)

KML

Write a KML or KMZ file
NAvalue

Set the NA value of a RasterLayer
Logic-methods

Logical operators and functions
Compare-methods

Compare Raster* objects
RGB

Create a Red-Green-Blue Raster object
Raster-class

Raster* classes
Arith-methods

Arithmetic with Raster* objects
Extent-class

Class "Extent"
Rcpp-class

Rcpp classes
Math-methods

Mathematical functions
Summary-methods

Summary methods
adjacent

Adjacent cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
barplot

Bar plot of a RasterLayer
bands

Number of bands
blockSize

Block size for writing files
bind

Bind Spatial* objects
addLayer

Add or drop a layer
as.list

Create a list of RasterLayer objects
as.logical

Change cell values to logical or integer values
cellFrom

Get cell, row, or column number
calc

Calculate
alignExtent

Align an extent (object of class Extent)
animate

Animate layers of a Raster* object
as.raster

Coerce to a 'raster' object
cellStats

Statistics across cells
corLocal

Local correlation coefficient
as.matrix

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

Character representation of a Raster or Extent object
cover

Replace NA values with values of other layers
clump

Detect clumps
click

Query by clicking on a map
dataType

Data type
datasource

Are values in memory and/or on disk?
approxNA

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

Spatial autocorrelation
clamp

Clamp values
atan2

Two argument arc-tangent
clearValues

Clear values
as.data.frame

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

Distance
boxplot

Box plot of Raster objects
boundaries

boundaries (edges) detection
buffer

buffer
colortable

colortable
cluster

Use a multi-core cluster
brick

Create a RasterBrick object
area

Size of cells
compareCRS

Partially compare two CRS objects
crop

Crop
compareRaster

Compare Raster objects
cellsFromExtent

Cells from extent, and vice versa
contour

Contour plot
Extreme coordinates

Coordinates of the Extent of a Raster object
dim

Dimensions of a Raster* object
density

Density plot
extend

Extend
erase

focal

Focal values
distanceFromPoints

Distance from points
flip

Flip
flowPath

Flow path
focalWeight

Focal weights matrix
isLonLat

Is this longitude/latitude data?
direction

Direction
intersect

Intersect
cut

Convert values to classes
disaggregate

Disaggregate
extension

Filename extensions
filename

Filename
cv

Coefficient of variation
Extract by index

Indexing to extract values of a Raster* object
extract

Extract values from Raster objects
drawExtent

Create an Extent object by drawing on a map
draw

Draw a line or polygon
filledContour

Filled contour plot
crosstab

Cross-tabulate
hillShade

Hill shading
localFun

Local functions
mask

Mask values in a Raster object
hist

Histogram
nlayers

Number of layers
overlay

Overlay Raster objects
layerStats

Correlation and (weighted) covariance
freq

Frequency table
gridDistance

Distance on a grid
getValuesBlock

Get a block of raster cell values
layerize

Layerize
origin

Origin
getValuesFocal

Get focal raster cell values
extent

Extent
pairs

Pairs plot (matrix of scatterplots)
getValues

Get raster cell values
ncell

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

Names of raster layers
properties

Raster file properties
extremeValues

Minimum and maximum values
getData

Get geographic data
geom

Get the coordinates of a vector type Spatial* object
factors

Factors
quantile

Raster quantiles
Gain and offset

Gain and offset of values on file
image

Image
resolution

Resolution
metadata

Metadata
inifile

Read a .ini file
projectRaster

Project a Raster object
modal

modal value
pointDistance

Distance between points
resample

Resample a Raster object
projection

Get or set a coordinate reference system (projection)
rectify

rectify a Raster object
plotRGB

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

rowSums and colSums for Raster objects
rowFromCell

Row or column number from a cell number
initialize

Initialize a Raster object with values
rasterToContour

Raster to contour lines conversion
Programming

Helper functions for programming
interpolate

Interpolate
movingFun

Moving functions
mosaic

Merge Raster* objects using a function for overlapping areas
predict

Spatial model predictions
hdr

Header files
sampleRegular

Regular sample
rasterToPoints

Raster to points conversion
raster-package

Overview of the functions in the raster package
select

Geometric subsetting
sampleStratified

Stratified random sample
scalebar

scalebar
match

Value matching for Raster* objects
head

Show the head or tail of a Raster* object
setExtent

Set the extent of a RasterLayer
merge

Merge Raster* objects
setMinMax

Compute min and max values
rasterFromCells

Subset a raster by cell numbers
plot

Plot a Raster* object
raster

Create a RasterLayer object
persp

Perspective plot
rotate

Rotate
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
stack

Create a RasterStack object
stackSave

Save or open a RasterStack file
scale

Scale values
rotated

Do the raster cells have a rotation?
spPolygons

Create SpatialLines* or SpatialPolygons*
spplot

Use spplot to plot a Raster* or other object
stackSelect

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

Global options for the raster package
rasterTmpFile

Temporary files
rasterToPolygons

Raster to polygons conversion
rasterFromXYZ

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

Zonal statistics
Extent math

round Extent coordinates
round

Integer values
terrain

Terrain characteristics
replacement

Replace cell values or layers of a Raster* object
transpose

Transpose
text

Add labels to a map
zoom

Zoom in on a map
unique

Unique values
zApply

z (time) apply
xyFromCell

Coordinates from a row, column or cell number
union

Union Extent or SpatialPolygons* objects
reclassify

Reclassify
SampleInt

Sample integer values
shift

Shift
Slope and aspect

Slope and aspect
sampleRandom

Random sample
readAll

Read values from disk
stretch

Stretch
setValues

Set values of a Raster object
weighted.mean

Weighted mean of rasters
shapefile

Read or write a shapefile
which

Which cells are TRUE?
rasterize

Rasterize points, lines, or polygons
symdif

Symetrical difference
Summary

Summary
trim

Trim
subset

Subset layers in a Raster* object
unstack

Unstack
substitute

Substitute values in a Raster* object
z-values

Get or set z-values
validNames

Create valid names
writeValues

Write values to a file
validCell

Validity of a cell, column or row number
writeRaster

Write raster data to a file
writeFormats

File types for writing
which.min

Where is the min or max value?
update

Update raster cells of files (on disk)