Learn R Programming

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

raster (version 3.4-5)

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-5

License

GPL (>= 3)

Maintainer

Last Published

November 14th, 2020

Functions in raster (3.4-5)

Rcpp-class

Rcpp classes
Raster-class

Raster* classes
Extent-class

Class "Extent"
Math-methods

Mathematical functions
Compare-methods

Compare Raster* objects
Arith-methods

Arithmetic with Raster* objects
KML

Write a KML or KMZ file
adjacent

Adjacent cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
bands

Number of bands
NAvalue

Set the NA value of a RasterLayer
addLayer

Add or drop a layer
as.list

Create a list of RasterLayer objects
Summary-methods

Summary methods
barplot

Bar plot of a RasterLayer
approxNA

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

Clamp values
area

Size of cells
as.character

Character representation of a Raster or Extent object
cellStats

Statistics across cells
RGB

Create a Red-Green-Blue Raster object
boundaries

boundaries (edges) detection
clearValues

Clear values
as.logical

Change cell values to logical or integer values
as.raster

Coerce to a 'raster' object
boxplot

Box plot of Raster objects
as.matrix

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

Align an extent (object of class Extent)
blockSize

Block size for writing files
as.data.frame

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

Bind Spatial* objects
animate

Animate layers of a Raster* object
cluster

Use a multi-core cluster
clump

Detect clumps
click

Query by clicking on a map
contour

Contour plot
cellsFromExtent

Cells from extent, and vice versa
extremeValues

Minimum and maximum values
factors

Factors
Extract by index

Indexing to extract values of a Raster* object
brick

Create a RasterBrick object
datasource

Are values in memory and/or on disk?
cut

Convert values to classes
dataType

Data type
Extreme coordinates

Coordinates of the Extent of a Raster object
getValuesBlock

Get a block of raster cell values
getValues

Get raster cell values
extract

Extract values from Raster objects
nlayers

Number of layers
draw

Draw a line or polygon
cv

Coefficient of variation
focal

Focal values
mask

Mask values in a Raster object
autocorrelation

Spatial autocorrelation
colortable

colortable
hist

Histogram
hillShade

Hill shading
buffer

buffer
focalWeight

Focal weights matrix
localFun

Local functions
atan2

Two argument arc-tangent
origin

Origin
reclassify

Reclassify
quantile

Raster quantiles
calc

Calculate
properties

Raster file properties
filename

Filename
drawExtent

Create an Extent object by drawing on a map
persp

Perspective plot
readAll

Read values from disk
filledContour

Filled contour plot
crop

Crop
hdr

Header files
cellFrom

Get cell, row, or column number
corLocal

Local correlation coefficient
setValues

Set values of a Raster object
shapefile

Read or write a shapefile
Summary

Summary
rasterFromCells

Subset a raster by cell numbers
compareRaster

Compare Raster objects
disaggregate

Disaggregate
rasterFromXYZ

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

Show the head or tail of a Raster* object
plot

Plot a Raster* object
direction

Direction
compareCRS

Partially compare two CRS objects
symdif

Symetrical difference
cover

Replace NA values with values of other layers
extend

Extend
resample

Resample a Raster object
erase

dim

Dimensions of a Raster* object
geom

Get the coordinates of a vector type Spatial* object
freq

Frequency table
Gain and offset

Gain and offset of values on file
resolution

Resolution
density

Density plot
transpose

Transpose
image

Image
flip

Flip
inifile

Read a .ini file
extent

Extent
extension

Filename extensions
sampleRegular

Regular sample
crosstab

Cross-tabulate
names

Names of raster layers
trim

Trim
getData

Get geographic data
intersect

Intersect
ncell

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

Stratified random sample
terrain

Terrain characteristics
scalebar

scalebar
select

Geometric subsetting
getValuesFocal

Get focal raster cell values
text

Add labels to a map
distanceFromPoints

Distance from points
flowPath

Flow path
distance

Distance
gridDistance

Distance on a grid
predict

Spatial model predictions
Programming

Helper functions for programming
metadata

Metadata
modal

modal value
isLonLat

Is this longitude/latitude data?
layerStats

Correlation and (weighted) covariance
z-values

Get or set z-values
unique

Unique values
union

Union Extent or SpatialPolygons* objects
rotate

Rotate
which.min

Where is the min or max value?
projection

Get or set a coordinate reference system (projection)
projectRaster

Project a Raster object
writeFormats

File types for writing
layerize

Layerize
initialize

Initialize a Raster object with values
merge

Merge Raster* objects
interpolate

Interpolate
match

Value matching for Raster* objects
mosaic

Merge Raster* objects using a function for overlapping areas
pointDistance

Distance between points
raster

Create a RasterLayer object
raster-package

Overview of the functions in the raster package
plotRGB

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

Random sample
SampleInt

Sample integer values
rotated

Do the raster cells have a rotation?
rowFromCell

Row or column number from a cell number
stack

Create a RasterStack object
movingFun

Moving functions
rasterToContour

Raster to contour lines conversion
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
overlay

Overlay Raster objects
rowSums

rowSums and colSums for Raster objects
Options

Global options for the raster package
rectify

rectify a Raster object
rasterTmpFile

Temporary files
pairs

Pairs plot (matrix of scatterplots)
rasterToPoints

Raster to points conversion
stackSave

Save or open a RasterStack file
rasterToPolygons

Raster to polygons conversion
scale

Scale values
replacement

Replace cell values or layers of a Raster* object
round

Integer values
rasterize

Rasterize points, lines, or polygons
sp

Create SpatialLines* or SpatialPolygons*
stretch

Stretch
substitute

Substitute values in a Raster* object
stackSelect

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

Use spplot to plot a Raster* or other object
setExtent

Set the extent of a RasterLayer
setMinMax

Compute min and max values
validCell

Validity of a cell, column or row number
subset

Subset layers in a Raster* object
unstack

Unstack
Extent math

round Extent coordinates
shift

Shift
writeValues

Write values to a file
writeRaster

Write raster data to a file
update

Update raster cells of files (on disk)
validNames

Create valid names
Slope and aspect

Slope and aspect
weighted.mean

Weighted mean of rasters
xyFromCell

Coordinates from a row, column or cell number
which

Which cells are TRUE?
zApply

z (time) apply
zonal

Zonal statistics
zoom

Zoom in on a map
Logic-methods

Logical operators and functions