Learn R Programming

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

raster (version 3.6-20)

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

140,904

Version

3.6-20

License

GPL (>= 3)

Maintainer

Last Published

March 6th, 2023

Functions in raster (3.6-20)

Extent-class

Class "Extent"
as.character

Character representation of a Raster or Extent object
alignExtent

Align an extent (object of class Extent)
clump

Detect clumps
click

Query by clicking on a map
brick

Create a RasterBrick object
NAvalue

Set the NA value of a RasterLayer
clearValues

Clear values
RGB

Create a Red-Green-Blue Raster object
adjacent

Adjacent cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
getValuesBlock

Get a block of raster cell values
addLayer

Add or drop a layer
density

Density plot
approxNA

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

Number of bands
Summary-methods

Summary methods
clamp

Clamp values
barplot

Bar plot of a RasterLayer
Compare-methods

Compare Raster* objects
Arith-methods

Arithmetic with Raster* objects
plotRGB

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

Statistics across cells
atan2

Two argument arc-tangent
datasource

Are values in memory and/or on disk?
dim

Dimensions of a Raster* object
animate

Animate layers of a Raster* object
bind

Bind Spatial* objects
colortable

colortable
crosstab

Cross-tabulate
compareCRS

Partially compare two CRS objects
nlayers

Number of layers
Logic-methods

Logical operators and functions
compareRaster

Compare Raster objects
blockSize

Block size for writing files
autocorrelation

Spatial autocorrelation
cut

Convert values to classes
cluster

Use a multi-core cluster
stackSelect

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

Local functions
disaggregate

Disaggregate
Math-methods

Mathematical functions
boundaries

boundaries (edges) detection
dataType

Data type
substitute

Substitute values in a Raster* object
focalWeight

Focal weights matrix
calc

Calculate
Rcpp-class

Rcpp classes
contour

Contour plot
boxplot

Box plot of Raster objects
mosaic

Merge Raster* objects using a function for overlapping areas
filename

Filename
filledContour

Filled contour plot
direction

Direction
getData

Get geographic data
freq

Frequency table
draw

Draw a line or polygon
drawExtent

Create an Extent object by drawing on a map
cellFrom

Get cell, row, or column number
crop

Crop
KML

Write a KML or KMZ file
as.matrix

Get a vector, matrix, or array with raster cell values
Raster-class

Raster* classes
Extract by index

Indexing to extract values of a Raster* object
getValues

Get raster cell values
hdr

Header files
erase

flip

Flip
head

Show the head or tail of a Raster* object
properties

Raster file properties
extend

Extend
isLonLat

Is this longitude/latitude data?
intersect

Intersect
names

Names of raster layers
ncell

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

Coefficient of variation
unstack

Unstack
Summary

Summary
as.data.frame

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

Get the coordinates of a vector type Spatial* object
Extent math

round Extent coordinates
area

Size of cells
setValues

Set values of a Raster object
as.raster

Coerce to a 'raster' object
projection

Get or set a coordinate reference system (projection)
scalebar

scalebar
buffer

buffer
layerize

Layerize
resample

Resample a Raster object
hillShade

Hill shading
raster

Create a RasterLayer object
flowPath

Flow path
persp

Perspective plot
quantile

Raster quantiles
as.list

Create a list of RasterLayer objects
Extreme coordinates

Coordinates of the Extent of a Raster object
distance

Distance
replacement

Replace cell values or layers of a Raster* object
rectify

rectify a Raster object
select

Geometric subsetting
mask

Mask values in a Raster object
zonal

Zonal statistics
cellsFromExtent

Cells from extent, and vice versa
as.logical

Change cell values to logical or integer values
subset

Subset layers in a Raster* object
focal

Focal values
extract

Extract values from Raster objects
inifile

Read a .ini file
pointDistance

Distance between points
shapefile

Read or write a shapefile
sampleRandom

Random sample
which.min

Where is the min or max value?
hist

Histogram
distanceFromPoints

Distance from points
extension

Filename extensions
plot

Plot a Raster* object
cover

Replace NA values with values of other layers
corLocal

Local correlation coefficient
writeFormats

File types for writing
readAll

Read values from disk
origin

Origin
rasterToContour

Raster to contour lines conversion
rotated

Do the raster cells have a rotation?
rasterToPoints

Raster to points conversion
rowFromCell

Row or column number from a cell number
SampleInt

Sample integer values
reclassify

Reclassify
writeRaster

Write raster data to a file
rotate

Rotate
setMinMax

Compute min and max values
rowSums

rowSums and colSums for Raster objects
stretch

Stretch
validCell

Validity of a cell, column or row number
Gain and offset

Gain and offset of values on file
match

Value matching for Raster* objects
extremeValues

Minimum and maximum values
extent

Extent
image

Image
rasterFromCells

Subset a raster by cell numbers
interpolate

Interpolate
trim

Trim
union

Union Extent or SpatialPolygons* objects
factors

Factors
rasterTmpFile

Temporary files
z-values

Get or set z-values
setExtent

Set the extent of a RasterLayer
metadata

Metadata
sampleRegular

Regular sample
writeValues

Write values to a file
modal

modal value
layerStats

Correlation and (weighted) covariance
getValuesFocal

Get focal raster cell values
terrain

Terrain characteristics
overlay

Overlay Raster objects
gridDistance

Distance on a grid
unique

Unique values
symdif

Symetrical difference
zoom

Zoom in on a map
predict

Spatial model predictions
Programming

Helper functions for programming
projectRaster

Project a Raster object
initialize

Initialize a Raster object with values
rasterToPolygons

Raster to polygons conversion
update

Update raster cells of files (on disk)
merge

Merge Raster* objects
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
validNames

Create valid names
raster-package

Overview of the functions in the raster package
shift

Shift
Options

Global options for the raster package
movingFun

Moving functions
round

Integer values
spEasy

Create SpatialLines* or SpatialPolygons*
weighted.mean

Weighted mean of rasters
pairs

Pairs plot (matrix of scatterplots)
rasterFromXYZ

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

Stratified random sample
transpose

Transpose
rasterize

Rasterize points, lines, or polygons
spplot

Use spplot to plot a Raster* or other object
text

Add labels to a map
zApply

z (time) apply
xyFromCell

Coordinates from a row, column or cell number
resolution

Resolution
scale

Scale values
stackSave

Save or open a RasterStack file
Slope and aspect

Slope and aspect
which

Which cells are TRUE?
stack

Create a RasterStack object