Learn R Programming

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

raster (version 3.0-7)

Geographic Data Analysis and Modeling

Description

Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package implements basic and high-level functions. Processing of very large files is supported. There is a also support 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

171,298

Version

3.0-7

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

September 24th, 2019

Functions in raster (3.0-7)

Raster-class

Raster* classes
Rcpp-class

Rcpp classes
atan2

Two argument arc-tangent
cellFrom

Get cell, row, or column number
autocorrelation

Spatial autocorrelation
KML

Write a KML or KMZ file
Extent-class

Class "Extent"
calc

Calculate
NAvalue

Set the NA value of a RasterLayer
cluster

Use a multi-core cluster
RGB

Create a Red-Green-Blue Raster object
colortable

colortable
as.data.frame

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

Character representation of a Raster or Extent object
Compare-methods

Compare Raster* objects
Arith-methods

Arithmetic with Raster* objects
cut

Convert values to classes
cv

Coefficient of variation
extract

Extract values from Raster objects
bands

Number of bands
Extract by index

Indexing to extract values of a Raster* object
alignExtent

Align an extent (object of class Extent)
animate

Animate layers of a Raster* object
barplot

Bar plot of a RasterLayer
approxNA

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

Change cell values to logical or integer values
area

Size of cells
as.list

Create a list of RasterLayer objects
blockSize

Block size for writing files
cellsFromExtent

Cells from extent, and vice versa
bind

Bind Spatial* objects
cellStats

Statistics across cells
compareRaster

Compare Raster objects
crop

Crop
compareCRS

Partially compare two CRS objects
brick

Create a RasterBrick object
filename

Filename
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
addLayer

Add or drop a layer
Summary-methods

Summary methods
corLocal

Local correlation coefficient
clearValues

Clear values
cover

Replace NA values with values of other layers
clamp

Clamp values
buffer

buffer
dim

Dimensions of a Raster* object
distance

Distance
density

Density plot
click

Query by clicking on a map
as.raster

Coerce to a 'raster' object
crosstab

Cross-tabulate
as.matrix

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

Detect clumps
extremeValues

Minimum and maximum values
contour

Contour plot
factors

Factors
erase

extend

Extend
filledContour

Filled contour plot
getValues

Get raster cell values
initialize

Initialize a Raster object with values
interpolate

Interpolate
distanceFromPoints

Distance from points
getValuesBlock

Get a block of raster cell values
Extreme coordinates

Coordinates of the Extent of a Raster object
mosaic

Merge Raster* objects using a function for overlapping areas
hdr

Header files
intersect

Intersect
match

Value matching for Raster* objects
isLonLat

Is this longitude/latitude data?
head

Show the head or tail of a Raster* object
merge

Merge Raster* objects
overlay

Overlay Raster objects
pairs

Pairs plot (matrix of scatterplots)
resolution

Resolution
sp

Create SpatialLines* or SpatialPolygons*
spplot

Use spplot to plot a Raster* or other object
resample

Resample a Raster object
dataType

Data type
image

Image
getValuesFocal

Get focal raster cell values
metadata

Metadata
inifile

Read a .ini file
gridDistance

Distance on a grid
modal

modal value
substitute

Substitute values in a Raster* object
projection

Get or set a coordinate reference system (projection)
rasterToPoints

Raster to points conversion
rasterToContour

Raster to contour lines conversion
projectRaster

Project a Raster object
movingFun

Moving functions
subset

Subset layers in a Raster* object
xyFromCell

Coordinates from a row, column or cell number
plot

Plot a Raster* object
persp

Perspective plot
freq

Frequency table
zApply

z (time) apply
Gain and offset

Gain and offset of values on file
geom

Get the coordinates of a vector type Spatial* object
getData

Get geographic data
datasource

Are values in memory and/or on disk?
rectify

rectify a Raster object
replacement

Replace cell values or layers of a Raster* object
extension

Filename extensions
extent

Extent
stretch

Stretch
sampleRandom

Random sample
SampleInt

Sample integer values
stackSelect

Select cell values from a multi-layer Raster* object
which.min

Where is the min or max value?
which

Which cells are TRUE?
weighted.mean

Weighted mean of rasters
flip

Flip
flowPath

Flow path
hist

Histogram
mask

Mask values in a Raster object
hillShade

Hill shading
localFun

Local functions
nlayers

Number of layers
raster-package

Overview of the functions in the raster package
writeFormats

File types for writing
origin

Origin
aggregate

Aggregate raster cells or SpatialPolygons/Lines
adjacent

Adjacent cells
boundaries

boundaries (edges) detection
boxplot

Box plot of Raster objects
direction

Direction
draw

Draw a line or polygon
disaggregate

Disaggregate
drawExtent

Create an Extent object by drawing on a map
plotRGB

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

Distance between points
focal

Focal values
focalWeight

Focal weights matrix
layerStats

Correlation and (weighted) covariance
raster

Create a RasterLayer object
rasterTmpFile

Temporary files
Programming

Helper functions for programming
predict

Spatial model predictions
properties

Raster file properties
quantile

Raster quantiles
Options

Global options for the raster package
readAll

Read values from disk
layerize

Layerize
rotate

Rotate
reclassify

Reclassify
rotated

Do the raster cells have a rotation?
Extent math

round Extent coordinates
round

Integer values
setExtent

Set the extent of a RasterLayer
rowSums

rowSums and colSums for Raster objects
rowFromCell

Row or column number from a cell number
names

Names of raster layers
shift

Shift
setMinMax

Compute min and max values
rasterize

Rasterize points, lines, or polygons
rasterToPolygons

Raster to polygons conversion
ncell

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

Set values of a Raster object
sampleStratified

Stratified random sample
sampleRegular

Regular sample
shapefile

Read or write a shapefile
symdif

Symetrical difference
Summary

Summary
transpose

Transpose
z-values

Get or set z-values
trim

Trim
terrain

Terrain characteristics
Slope and aspect

Slope and aspect
validCell

Validity of a cell, column or row number
text

Add labels to a map
validNames

Create valid names
zonal

Zonal statistics
zoom

Zoom in on a map
stackSave

Save or open a RasterStack file
unstack

Unstack
rasterFromXYZ

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

Subset a raster by cell numbers
scale

Scale values
update

Update raster cells of files (on disk)
scalebar

scalebar
select

Geometric subsetting
stack

Create a RasterStack object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
union

Union Extent or SpatialPolygons* objects
unique

Unique values
writeRaster

Write raster data to a file
writeValues

Write values to a file