Learn R Programming

raster (version 3.6-30)

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

109,462

Version

3.6-30

License

GPL (>= 3)

Maintainer

Last Published

October 2nd, 2024

Functions in raster (3.6-30)

aggregate

Aggregate raster cells or SpatialPolygons/Lines
addLayer

Add or drop a layer
atan2

Two argument arc-tangent
as.logical

Change cell values to logical or integer values
as.list

Create a list of RasterLayer objects
bands

Number of bands
barplot

Bar plot of a RasterLayer
autocorrelation

Spatial autocorrelation
boxplot

Box plot of Raster objects
cellFrom

Get cell, row, or column number
blockSize

Block size for writing files
calc

Calculate
boundaries

boundaries (edges) detection
bind

Bind Spatial* objects
brick

Create a RasterBrick object
buffer

buffer
as.raster

Coerce to a 'raster' object
as.matrix

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

Query by clicking on a map
Extreme coordinates

Coordinates of the Extent of a Raster object
compareRaster

Compare Raster objects
clamp

Clamp values
clearValues

Clear values
contour

Contour plot
clump

Detect clumps
cv

Coefficient of variation
compareCRS

Partially compare two CRS objects
cut

Convert values to classes
density

Density plot
extent

Extent
extension

Filename extensions
datasource

Are values in memory and/or on disk?
dataType

Data type
corLocal

Local correlation coefficient
cellsFromExtent

Cells from extent, and vice versa
cover

Replace NA values with values of other layers
cellStats

Statistics across cells
dim

Dimensions of a Raster* object
filename

Filename
extremeValues

Minimum and maximum values
crop

Crop
Extract by index

Indexing to extract values of a Raster* object
draw

Draw a line or polygon
factors

Factors
extract

Extract values from Raster objects
getValues

Get raster cell values
filledContour

Filled contour plot
distance

Distance
drawExtent

Create an Extent object by drawing on a map
cluster

Use a multi-core cluster
distanceFromPoints

Distance from points
focal

Focal values
disaggregate

Disaggregate
colortable

colortable
direction

Direction
getValuesFocal

Get focal raster cell values
gridDistance

Distance on a grid
hillShade

Hill shading
flip

Flip
intersect

Intersect
focalWeight

Focal weights matrix
geom

Get the coordinates of a vector type Spatial* object
hist

Histogram
nlayers

Number of layers
flowPath

Flow path
isLonLat

Is this longitude/latitude data?
origin

Origin
getData

Get geographic data
localFun

Local functions
match

Value matching for Raster* objects
crosstab

Cross-tabulate
erase

mask

Mask values in a Raster object
extend

Extend
predict

Spatial model predictions
getValuesBlock

Get a block of raster cell values
pointDistance

Distance between points
freq

Frequency table
plotRGB

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

Perspective plot
Gain and offset

Gain and offset of values on file
merge

Merge Raster* objects
resample

Resample a Raster object
hdr

Header files
image

Image
head

Show the head or tail of a Raster* object
layerStats

Correlation and (weighted) covariance
initialize

Initialize a Raster object with values
inifile

Read a .ini file
plot

Plot a Raster* object
layerize

Layerize
Programming

Helper functions for programming
rasterToContour

Raster to contour lines conversion
rasterFromCells

Subset a raster by cell numbers
rasterFromXYZ

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

Rotate
rasterToPoints

Raster to points conversion
rotated

Do the raster cells have a rotation?
interpolate

Interpolate
rowFromCell

Row or column number from a cell number
metadata

Metadata
mosaic

Merge Raster* objects using a function for overlapping areas
modal

modal value
rowSums

rowSums and colSums for Raster objects
movingFun

Moving functions
projectRaster

Project a Raster object
spEasy

Create SpatialLines* or SpatialPolygons*
projection

Get or set a coordinate reference system (projection)
properties

Raster file properties
resolution

Resolution
raster-package

Overview of the functions in the raster package
names

Names of raster layers
raster

Create a RasterLayer object
ncell

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

Integer values
readAll

Read values from disk
rectify

rectify a Raster object
quantile

Raster quantiles
overlay

Overlay Raster objects
replacement

Replace cell values or layers of a Raster* object
sampleRegular

Regular sample
pairs

Pairs plot (matrix of scatterplots)
sampleStratified

Stratified random sample
rasterToPolygons

Raster to polygons conversion
spplot

Use spplot to plot a Raster* or other object
setExtent

Set the extent of a RasterLayer
Extent math

round Extent coordinates
reclassify

Reclassify
SampleInt

Sample integer values
sampleRandom

Random sample
shift

Shift
Options

Global options for the raster package
scalebar

scalebar
Slope and aspect

Slope and aspect
select

Geometric subsetting
rasterTmpFile

Temporary files
rasterize

Rasterize points, lines, or polygons
transpose

Transpose
setValues

Set values of a Raster object
shapefile

Read or write a shapefile
stack

Create a RasterStack object
setMinMax

Compute min and max values
substitute

Substitute values in a Raster* object
stackSave

Save or open a RasterStack file
subset

Subset layers in a Raster* object
trim

Trim
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
union

Union Extent or SpatialPolygons* objects
scale

Scale values
unstack

Unstack
update

Update raster cells of files (on disk)
xyFromCell

Coordinates from a row, column or cell number
z-values

Get or set z-values
zApply

z (time) apply
terrain

Terrain characteristics
unique

Unique values
writeRaster

Write raster data to a file
text

Add labels to a map
validCell

Validity of a cell, column or row number
Summary

Summary
symdif

Symetrical difference
validNames

Create valid names
stackSelect

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

Write values to a file
zonal

Zonal statistics
zoom

Zoom in on a map
stretch

Stretch
weighted.mean

Weighted mean of rasters
which

Which cells are TRUE?
writeFormats

File types for writing
which.min

Where is the min or max value?
Arith-methods

Arithmetic with Raster* objects
adjacent

Adjacent cells
KML

Write a KML or KMZ file
alignExtent

Align an extent (object of class Extent)
NAvalue

Set the NA value of a RasterLayer
Raster-class

Raster* classes
Extent-class

Class "Extent"
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
Rcpp-class

Rcpp classes
RGB

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

Character representation of a Raster or Extent object
Compare-methods

Compare Raster* objects
Summary-methods

Summary methods
as.data.frame

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

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

Animate layers of a Raster* object
area

Size of cells