Learn R Programming

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

raster (version 3.3-7)

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

154,521

Version

3.3-7

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

June 27th, 2020

Functions in raster (3.3-7)

RGB

Create a Red-Green-Blue Raster object
KML

Write a KML or KMZ file
Logic-methods

Logical operators and functions
Raster-class

Raster* classes
Math-methods

Mathematical functions
Rcpp-class

Rcpp classes
NAvalue

Set the NA value of a RasterLayer
Extent-class

Class "Extent"
Compare-methods

Compare Raster* objects
Summary-methods

Summary methods
Arith-methods

Arithmetic with Raster* objects
alignExtent

Align an extent (object of class Extent)
approxNA

Estimate values for cell values that are NA by interpolating between layers
as.character

Character representation of a Raster or Extent object
as.data.frame

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

Add or drop a layer
as.logical

Change cell values to logical or integer values
as.raster

Coerce to a 'raster' object
as.list

Create a list of RasterLayer objects
as.matrix

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

Size of cells
bind

Bind Spatial* objects
blockSize

Block size for writing files
boundaries

boundaries (edges) detection
buffer

buffer
cellStats

Statistics across cells
brick

Create a RasterBrick object
compareRaster

Compare Raster objects
cellsFromExtent

Cells from extent, and vice versa
adjacent

Adjacent cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
corLocal

Local correlation coefficient
compareCRS

Partially compare two CRS objects
clamp

Clamp values
animate

Animate layers of a Raster* object
barplot

Bar plot of a RasterLayer
clearValues

Clear values
bands

Number of bands
cellFrom

Get cell, row, or column number
calc

Calculate
cluster

Use a multi-core cluster
boxplot

Box plot of Raster objects
atan2

Two argument arc-tangent
cut

Convert values to classes
click

Query by clicking on a map
cv

Coefficient of variation
datasource

Are values in memory and/or on disk?
autocorrelation

Spatial autocorrelation
clump

Detect clumps
dataType

Data type
contour

Contour plot
filename

Filename
crop

Crop
erase

names

Names of raster layers
distance

Distance
filledContour

Filled contour plot
crosstab

Cross-tabulate
ncell

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

Coordinates of the Extent of a Raster object
density

Density plot
interpolate

Interpolate
initialize

Initialize a Raster object with values
dim

Dimensions of a Raster* object
colortable

colortable
cover

Replace NA values with values of other layers
extract

Extract values from Raster objects
extend

Extend
Extract by index

Indexing to extract values of a Raster* object
disaggregate

Disaggregate
focal

Focal values
focalWeight

Focal weights matrix
geom

Get the coordinates of a vector type Spatial* object
distanceFromPoints

Distance from points
extension

Filename extensions
getData

Get geographic data
direction

Direction
extent

Extent
hillShade

Hill shading
predict

Spatial model predictions
origin

Origin
Programming

Helper functions for programming
hist

Histogram
nlayers

Number of layers
flip

Flip
isLonLat

Is this longitude/latitude data?
intersect

Intersect
draw

Draw a line or polygon
freq

Frequency table
raster-package

Overview of the functions in the raster package
persp

Perspective plot
flowPath

Flow path
Options

Global options for the raster package
getValues

Get raster cell values
raster

Create a RasterLayer object
rasterTmpFile

Temporary files
plot

Plot a Raster* object
Gain and offset

Gain and offset of values on file
movingFun

Moving functions
layerStats

Correlation and (weighted) covariance
layerize

Layerize
rotate

Rotate
pairs

Pairs plot (matrix of scatterplots)
rasterToPoints

Raster to points conversion
hdr

Header files
mosaic

Merge Raster* objects using a function for overlapping areas
rasterToContour

Raster to contour lines conversion
drawExtent

Create an Extent object by drawing on a map
getValuesBlock

Get a block of raster cell values
overlay

Overlay Raster objects
head

Show the head or tail of a Raster* object
localFun

Local functions
plotRGB

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

Do the raster cells have a rotation?
match

Value matching for Raster* objects
mask

Mask values in a Raster object
pointDistance

Distance between points
rectify

rectify a Raster object
properties

Raster file properties
sampleStratified

Stratified random sample
replacement

Replace cell values or layers of a Raster* object
merge

Merge Raster* objects
sampleRegular

Regular sample
extremeValues

Minimum and maximum values
unstack

Unstack
factors

Factors
rasterFromCells

Subset a raster by cell numbers
stackSave

Save or open a RasterStack file
update

Update raster cells of files (on disk)
which.min

Where is the min or max value?
scale

Scale values
rasterize

Rasterize points, lines, or polygons
writeFormats

File types for writing
rasterToPolygons

Raster to polygons conversion
rasterFromXYZ

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

Set the extent of a RasterLayer
setMinMax

Compute min and max values
rowFromCell

Row or column number from a cell number
getValuesFocal

Get focal raster cell values
quantile

Raster quantiles
scalebar

scalebar
rowSums

rowSums and colSums for Raster objects
gridDistance

Distance on a grid
substitute

Substitute values in a Raster* object
metadata

Metadata
subset

Subset layers in a Raster* object
inifile

Read a .ini file
image

Image
sp

Create SpatialLines* or SpatialPolygons*
select

Geometric subsetting
readAll

Read values from disk
stackSelect

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

Transpose
terrain

Terrain characteristics
reclassify

Reclassify
SampleInt

Sample integer values
sampleRandom

Random sample
spplot

Use spplot to plot a Raster* or other object
text

Add labels to a map
projectRaster

Project a Raster object
modal

modal value
setValues

Set values of a Raster object
trim

Trim
resample

Resample a Raster object
resolution

Resolution
projection

Get or set a coordinate reference system (projection)
round

Integer values
Extent math

round Extent coordinates
validCell

Validity of a cell, column or row number
validNames

Create valid names
shift

Shift
stretch

Stretch
shapefile

Read or write a shapefile
Summary

Summary
Slope and aspect

Slope and aspect
writeValues

Write values to a file
writeRaster

Write raster data to a file
union

Union Extent or SpatialPolygons* objects
stack

Create a RasterStack object
weighted.mean

Weighted mean of rasters
zApply

z (time) apply
xyFromCell

Coordinates from a row, column or cell number
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unique

Unique values
zonal

Zonal statistics
which

Which cells are TRUE?
z-values

Get or set z-values
zoom

Zoom in on a map
symdif

Symetrical difference