Learn R Programming

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

raster (version 3.6-3)

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

115,676

Version

3.6-3

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 18th, 2022

Functions in raster (3.6-3)

alignExtent

Align an extent (object of class Extent)
approxNA

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

Add or drop a layer
adjacent

Adjacent cells
as.data.frame

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

Size of cells
animate

Animate layers of a Raster* object
as.character

Character representation of a Raster or Extent object
Summary-methods

Summary methods
aggregate

Aggregate raster cells or SpatialPolygons/Lines
blockSize

Block size for writing files
atan2

Two argument arc-tangent
as.list

Create a list of RasterLayer objects
as.matrix

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

Bind Spatial* objects
bands

Number of bands
as.logical

Change cell values to logical or integer values
clamp

Clamp values
autocorrelation

Spatial autocorrelation
as.raster

Coerce to a 'raster' object
clearValues

Clear values
cellFrom

Get cell, row, or column number
calc

Calculate
cluster

Use a multi-core cluster
compareRaster

Compare Raster objects
compareCRS

Partially compare two CRS objects
barplot

Bar plot of a RasterLayer
crop

Crop
crosstab

Cross-tabulate
dataType

Data type
Extreme coordinates

Coordinates of the Extent of a Raster object
boxplot

Box plot of Raster objects
contour

Contour plot
datasource

Are values in memory and/or on disk?
cellStats

Statistics across cells
boundaries

boundaries (edges) detection
erase

colortable

colortable
brick

Create a RasterBrick object
extent

Extent
extension

Filename extensions
freq

Frequency table
direction

Direction
extend

Extend
distance

Distance
clump

Detect clumps
click

Query by clicking on a map
cellsFromExtent

Cells from extent, and vice versa
flowPath

Flow path
flip

Flip
getValuesFocal

Get focal raster cell values
distanceFromPoints

Distance from points
Gain and offset

Gain and offset of values on file
geom

Get the coordinates of a vector type Spatial* object
getData

Get geographic data
image

Image
gridDistance

Distance on a grid
disaggregate

Disaggregate
initialize

Initialize a Raster object with values
extremeValues

Minimum and maximum values
interpolate

Interpolate
factors

Factors
mosaic

Merge Raster* objects using a function for overlapping areas
cut

Convert values to classes
movingFun

Moving functions
names

Names of raster layers
mask

Mask values in a Raster object
localFun

Local functions
ncell

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

Pairs plot (matrix of scatterplots)
overlay

Overlay Raster objects
rasterFromCells

Subset a raster by cell numbers
rasterFromXYZ

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

buffer
cv

Coefficient of variation
resolution

Resolution
resample

Resample a Raster object
projectRaster

Project a Raster object
projection

Get or set a coordinate reference system (projection)
inifile

Read a .ini file
match

Value matching for Raster* objects
raster-package

Overview of the functions in the raster package
corLocal

Local correlation coefficient
cover

Replace NA values with values of other layers
setValues

Set values of a Raster object
draw

Draw a line or polygon
extract

Extract values from Raster objects
Extract by index

Indexing to extract values of a Raster* object
shapefile

Read or write a shapefile
rotate

Rotate
raster

Create a RasterLayer object
drawExtent

Create an Extent object by drawing on a map
getValues

Get raster cell values
rotated

Do the raster cells have a rotation?
density

Density plot
Summary

Summary
SampleInt

Sample integer values
filename

Filename
symdif

Symetrical difference
filledContour

Filled contour plot
xyFromCell

Coordinates from a row, column or cell number
predict

Spatial model predictions
merge

Merge Raster* objects
sampleRandom

Random sample
hdr

Header files
scalebar

scalebar
select

Geometric subsetting
Programming

Helper functions for programming
terrain

Terrain characteristics
dim

Dimensions of a Raster* object
getValuesBlock

Get a block of raster cell values
head

Show the head or tail of a Raster* object
focal

Focal values
focalWeight

Focal weights matrix
zApply

z (time) apply
properties

Raster file properties
intersect

Intersect
layerStats

Correlation and (weighted) covariance
hillShade

Hill shading
text

Add labels to a map
layerize

Layerize
quantile

Raster quantiles
isLonLat

Is this longitude/latitude data?
rasterToPolygons

Raster to polygons conversion
weighted.mean

Weighted mean of rasters
which

Which cells are TRUE?
rasterize

Rasterize points, lines, or polygons
hist

Histogram
rowFromCell

Row or column number from a cell number
metadata

Metadata
plotRGB

Red-Green-Blue plot of a multi-layered Raster object
which.min

Where is the min or max value?
modal

modal value
rowSums

rowSums and colSums for Raster objects
writeFormats

File types for writing
pointDistance

Distance between points
rasterToContour

Raster to contour lines conversion
nlayers

Number of layers
Options

Global options for the raster package
rasterTmpFile

Temporary files
rectify

rectify a Raster object
shift

Shift
rasterToPoints

Raster to points conversion
replacement

Replace cell values or layers of a Raster* object
origin

Origin
persp

Perspective plot
sampleRegular

Regular sample
Slope and aspect

Slope and aspect
stackSave

Save or open a RasterStack file
sampleStratified

Stratified random sample
plot

Plot a Raster* object
reclassify

Reclassify
readAll

Read values from disk
setExtent

Set the extent of a RasterLayer
round

Integer values
scale

Scale values
setMinMax

Compute min and max values
Extent math

round Extent coordinates
transpose

Transpose
spEasy

Create SpatialLines* or SpatialPolygons*
trim

Trim
spplot

Use spplot to plot a Raster* or other object
stack

Create a RasterStack object
substitute

Substitute values in a Raster* object
stackSelect

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

Union Extent or SpatialPolygons* objects
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unique

Unique values
writeRaster

Write raster data to a file
writeValues

Write values to a file
stretch

Stretch
subset

Subset layers in a Raster* object
validCell

Validity of a cell, column or row number
validNames

Create valid names
z-values

Get or set z-values
unstack

Unstack
update

Update raster cells of files (on disk)
zoom

Zoom in on a map
zonal

Zonal statistics
Logic-methods

Logical operators and functions
Raster-class

Raster* classes
Math-methods

Mathematical functions
KML

Write a KML or KMZ file
Arith-methods

Arithmetic with Raster* objects
Compare-methods

Compare Raster* objects
NAvalue

Set the NA value of a RasterLayer
Extent-class

Class "Extent"
Rcpp-class

Rcpp classes
RGB

Create a Red-Green-Blue Raster object