Learn R Programming

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

raster (version 2.5-2)

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.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

125,710

Version

2.5-2

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

December 19th, 2015

Functions in raster (2.5-2)

cellsFromExtent

Cells from Extent
cut

Convert values to classes
erase

Erase parts of a Spatial* object
Summary-methods

Summary methods
aggregate

Aggregate raster cells or SpatialPolygons/Lines
as.logical

Change values to logical
clearValues

Clear values
area

Size of cells
addLayer

Add or drop a layer
brick

Create a RasterBrick object
clamp

Clamp values
Compare-methods

Compare Raster* objects
draw

Draw a line or polygon
inifile

Read a .ini file
colortable

colortable
alignExtent

Align an extent (object of class Extent)
focal

Focal values
properties

Raster file properties
hist

Histogram
drawExtent

Create an Extent object by drawing on a map
bind

Bind Spatial* objects
intersect

Intersect
crop

Crop
quantile

Raster quantiles
cellStats

Statistics across cells
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
rasterToPolygons

Raster to polygons conversion
rotate

Rotate
geom

Get the coordinates of a vector type Spatial* object
distance

Distance
cellFrom

Get cell, row, or column number
crosstab

Cross-tabulate
localFun

Local functions
plot

Plot a Raster* object
distanceFromPoints

Distance from points
persp

Perspective plot
rasterToContour

Raster to contour lines conversion
extract

Extract values from Raster objects
disaggregate

Disaggregate
ncell

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

Subset a raster by cell numbers
rasterTmpFile

Temporary files
as.data.frame

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

Read values from disk
isLonLat

Is this longitude/latitude data?
cluster

Use a multi-core cluster
direction

Direction
rowSums

rowSums and colSums for Raster objects
filename

Filename
getValuesFocal

Get focal raster cell values
flowPath

Flow path
dim

Dimensions of a Raster* object
Slope and aspect

Slope and aspect
click

Query by clicking on a map
rectify

rectify a Raster object
modal

modal value
rasterize

Rasterize points, lines, or polygons
flip

Flip
xyFromCell

Coordinates from a row, column or cell number
nlayers

Number of layers
adjacent

Adjacent cells
atan2

Two argument arc-tangent
buffer

buffer
stack

Create a RasterStack object
metadata

Metadata
approxNA

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

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

Calculate
head

Show the head or tail of a Raster* object
union

Union Extent or SpatialPolygons* objects
compareCRS

Partially compare two CRS objects
blockSize

Block size for writing files
interpolate

Interpolate
boxplot

Box plot of Raster objects
filledContour

Filled contour plot
match

Value matching for Raster* objects
initialize

Intitialize a Raster object with values
density

Density plot
resolution

Resolution
freq

Frequency table
overlay

Overlay Raster objects
mask

Mask values in a Raster object
sampleStratified

Stratified random sample
stackSelect

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

Set values of a Raster object
scalebar

scalebar
text

Add labels to a map
merge

Merge Raster* objects
getValuesBlock

Get a block of raster cell values
zApply

z (time) apply
validNames

Create valid names
reclassify

Reclassify
symdif

Symetrical difference
trim

Trim
weighted.mean

Weighted mean of rasters
rowFromCell

Row or column number from a cell number
origin

Origin
transpose

Transpose
layerize

Layerize
scale

Scale values
rasterToPoints

Raster to points conversion
setMinMax

Compute min and max values
Arith-methods

Arithmetic with Raster* objects
corLocal

Local correlation coefficient
Extract by index

Indexing to extract values of a Raster* object
Gain and offset

Gain and offset of values on file
pointDistance

Distance between points
rasterFromXYZ

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

Write a KML or KMZ file
stretch

Stretch
predict

Spatial model predictions
boundaries

boundaries (edges) detection
Programming

Helper functions for programming
SampleInt

Sample integer values
writeFormats

File types for writing
sp

Create SpatialLines* or SpatialPolygons*
raster

Create a RasterLayer object
terrain

Terrain characteristics
update

Update raster cells of files (on disk)
autocorrelation

Spatial autocorrelation
Options

Global options for the raster package
contour

Contour plot
barplot

Bar plot of a RasterLayer
setExtent

Set the extent of a RasterLayer
extent

Extent
stackSave

Save or open a RasterStack file
spplot

Use spplot to plot a Raster* object
extremeValues

Minimum and maximum values
getValues

Get raster cell values
movingFun

Moving functions
hillShade

Hill shading
Summary

Summary
shift

Shift
zonal

Zonal statistics
unstack

Unstack
which

Which cells are TRUE?
animate

Animate layers of a Raster* object
mosaic

Merge Raster* objects using a function for overlapping areas
validCell

Validity of a cell, column or row number
plotRGB

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

Project a Raster object
round

Integer values
substitute

Substitute values in a Raster* object
clump

Detect clumps
datasource

Are values in memory and/or on disk?
cv

Coefficient of variation
focalWeight

Focal weights matrix
unique

Unique values
writeValues

Write values to a file
raster-package

Overview of the functions in the raster package
replacement

Replace cell values or layers of a Raster* object
shapefile

Read or write a shapefile
sampleRandom

Random sample
RGB

Create a Red-Green-Blue Raster object
NAvalue

Set the NA value of a RasterLayer
compareRaster

Compare Raster objects
cover

Replace NA values with values of other layers
rotated

Do the raster cells have a rotation?
z-values

Get or set z-values
factors

Factors
hdr

Header files
names

Names of raster layers
layerStats

Correlation and (weighted) covariance
sampleRegular

Regular sample
Extent-class

Class "Extent"
Raster-class

Raster* classes
bands

Number of bands
Extreme coordinates

Coordinates of the Extent of a Raster object
extend

Extend
image

Image
pairs

Pairs plot (matrix of scatterplots)
Extent math

round Extent coordinates
writeRaster

Write raster data to a file
which.min

Where is the min or max value?
select

Geometric subsetting
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
as.raster

Coerce to a 'raster' object
dataType

Data type
extension

Filename extensions
getData

Get geographic data
gridDistance

Distance on a grid
projection

Get or set a coordinate reference system (projection)
resample

Resample a Raster object
subset

Subset layers in a Raster* object
zoom

Zoom in on a map