Learn R Programming

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

raster (version 3.6-11)

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. This package has been superseded by the "terra" package .

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

136,590

Version

3.6-11

License

GPL (>= 3)

Maintainer

Last Published

November 28th, 2022

Functions in raster (3.6-11)

Compare-methods

Compare Raster* objects
NAvalue

Set the NA value of a RasterLayer
Logic-methods

Logical operators and functions
Rcpp-class

Rcpp classes
Arith-methods

Arithmetic with Raster* objects
RGB

Create a Red-Green-Blue Raster object
KML

Write a KML or KMZ file
Raster-class

Raster* classes
Math-methods

Mathematical functions
Summary-methods

Summary methods
addLayer

Add or drop a layer
as.character

Character representation of a Raster or Extent object
animate

Animate layers of a Raster* object
alignExtent

Align an extent (object of class Extent)
area

Size of cells
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
adjacent

Adjacent cells
bind

Bind Spatial* objects
as.list

Create a list of RasterLayer objects
aggregate

Aggregate raster cells or SpatialPolygons/Lines
bands

Number of bands
barplot

Bar plot of a RasterLayer
as.matrix

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

Block size for writing files
cellStats

Statistics across cells
cellsFromExtent

Cells from extent, and vice versa
boxplot

Box plot of Raster objects
as.logical

Change cell values to logical or integer values
boundaries

boundaries (edges) detection
as.raster

Coerce to a 'raster' object
atan2

Two argument arc-tangent
compareRaster

Compare Raster objects
clamp

Clamp values
calc

Calculate
autocorrelation

Spatial autocorrelation
compareCRS

Partially compare two CRS objects
cut

Convert values to classes
dataType

Data type
cellFrom

Get cell, row, or column number
cv

Coefficient of variation
cluster

Use a multi-core cluster
colortable

colortable
density

Density plot
dim

Dimensions of a Raster* object
clearValues

Clear values
brick

Create a RasterBrick object
contour

Contour plot
buffer

buffer
extract

Extract values from Raster objects
Extreme coordinates

Coordinates of the Extent of a Raster object
click

Query by clicking on a map
focal

Focal values
clump

Detect clumps
Extract by index

Indexing to extract values of a Raster* object
corLocal

Local correlation coefficient
focalWeight

Focal weights matrix
cover

Replace NA values with values of other layers
filename

Filename
datasource

Are values in memory and/or on disk?
crop

Crop
erase

filledContour

Filled contour plot
distance

Distance
hdr

Header files
head

Show the head or tail of a Raster* object
distanceFromPoints

Distance from points
getValues

Get raster cell values
direction

Direction
extend

Extend
image

Image
freq

Frequency table
Gain and offset

Gain and offset of values on file
inifile

Read a .ini file
getValuesBlock

Get a block of raster cell values
movingFun

Moving functions
mosaic

Merge Raster* objects using a function for overlapping areas
geom

Get the coordinates of a vector type Spatial* object
disaggregate

Disaggregate
extremeValues

Minimum and maximum values
crosstab

Cross-tabulate
extension

Filename extensions
projectRaster

Project a Raster object
extent

Extent
projection

Get or set a coordinate reference system (projection)
rasterToContour

Raster to contour lines conversion
factors

Factors
getValuesFocal

Get focal raster cell values
draw

Draw a line or polygon
hillShade

Hill shading
layerStats

Correlation and (weighted) covariance
drawExtent

Create an Extent object by drawing on a map
gridDistance

Distance on a grid
rasterToPoints

Raster to points conversion
flip

Flip
flowPath

Flow path
hist

Histogram
intersect

Intersect
layerize

Layerize
nlayers

Number of layers
predict

Spatial model predictions
localFun

Local functions
stackSave

Save or open a RasterStack file
scale

Scale values
getData

Get geographic data
isLonLat

Is this longitude/latitude data?
metadata

Metadata
transpose

Transpose
trim

Trim
Programming

Helper functions for programming
initialize

Initialize a Raster object with values
interpolate

Interpolate
writeRaster

Write raster data to a file
match

Value matching for Raster* objects
raster-package

Overview of the functions in the raster package
merge

Merge Raster* objects
mask

Mask values in a Raster object
names

Names of raster layers
writeValues

Write values to a file
origin

Origin
ncell

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

Subset a raster by cell numbers
modal

modal value
persp

Perspective plot
plot

Plot a Raster* object
raster

Create a RasterLayer object
plotRGB

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

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

Global options for the raster package
pointDistance

Distance between points
overlay

Overlay Raster objects
rasterTmpFile

Temporary files
readAll

Read values from disk
properties

Raster file properties
pairs

Pairs plot (matrix of scatterplots)
rotate

Rotate
rectify

rectify a Raster object
quantile

Raster quantiles
rasterToPolygons

Raster to polygons conversion
replacement

Replace cell values or layers of a Raster* object
resample

Resample a Raster object
shift

Shift
reclassify

Reclassify
rotated

Do the raster cells have a rotation?
resolution

Resolution
Slope and aspect

Slope and aspect
sampleRegular

Regular sample
SampleInt

Sample integer values
stack

Create a RasterStack object
rowFromCell

Row or column number from a cell number
sampleRandom

Random sample
sampleStratified

Stratified random sample
rowSums

rowSums and colSums for Raster objects
rasterize

Rasterize points, lines, or polygons
setValues

Set values of a Raster object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
round

Integer values
shapefile

Read or write a shapefile
weighted.mean

Weighted mean of rasters
Extent math

round Extent coordinates
which

Which cells are TRUE?
setExtent

Set the extent of a RasterLayer
setMinMax

Compute min and max values
Summary

Summary
scalebar

scalebar
spEasy

Create SpatialLines* or SpatialPolygons*
terrain

Terrain characteristics
text

Add labels to a map
symdif

Symetrical difference
xyFromCell

Coordinates from a row, column or cell number
select

Geometric subsetting
zApply

z (time) apply
zonal

Zonal statistics
zoom

Zoom in on a map
spplot

Use spplot to plot a Raster* or other object
stackSelect

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

Substitute values in a Raster* object
validCell

Validity of a cell, column or row number
validNames

Create valid names
stretch

Stretch
which.min

Where is the min or max value?
subset

Subset layers in a Raster* object
union

Union Extent or SpatialPolygons* objects
writeFormats

File types for writing
unstack

Unstack
update

Update raster cells of files (on disk)
unique

Unique values
z-values

Get or set z-values
Extent-class

Class "Extent"