Learn R Programming

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

raster (version 2.1-66)

raster: Geographic data analysis and modeling

Description

Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package implements basic and high-level functions and processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

119,565

Version

2.1-66

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

November 18th, 2013

Functions in raster (2.1-66)

adjacent

Adjacent cells
Extent-class

Class "Extent"
extent

Extent
Arith-methods

Arithmetic with Raster* objects
area

Size of cells
cut

Convert values to classes
Gain and offset

Gain and offset of values on file
bands

Number of bands
dim

Dimensions of a Raster* object
isLonLat

Is this longitude/latitude data?
sampleRegular

Regular sample
hist

Histogram
as.logical

Change values to logical
barplot

Bar plot of a RasterLayer
flowPath

Flow path
as.data.frame

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

Create a RasterStack object
initialize

Intitialize
clearValues

Clear values
extension

Filename extensions
raster-package

Overview of the functions in the raster package
Summary-methods

Summary methods
rasterToPolygons

Raster to polygons conversion
zonal

Zonal statistics
cellsFromExtent

Cells from Extent
cellFrom

Get cell, row, or column number
readAll

Read values from disk
Extract by index

Indexing to extract values of a Raster* object
focalWeight

Focal weights matrix
contour

Contour plot
stackSave

Save or open a RasterStack file
dataType

Data type
writeValues

Write values to a file
gridDistance

Distance on a grid
replacement

Replace cell values or layers of a Raster* object
draw

Draw a line or polygon
zApply

z (time) apply
extremeValues

Minimum and maximum values
head

Show the head or tail of a Raster* object
pointDistance

Distance between points
round

Integer values
update

Update raster cells of files (on disk)
zoom

Zoom in on a plot
subset

Subset layers in a Raster* object
distance

Distance
click

Query by clicking on a map
which

Which cells are TRUE?
datasource

Are values in memory and/or on disk?
crosstab

Cross-tabulate
Extent coordinates

Coordinates of the Extent of a Raster object
rectify

rectify a Raster object
merge

Merge Raster* objects
rotated

Do the raster cells have a rotation?
edges

Edges detection
text

Add labels to a map
shift

Shift
properties

Raster file properties
filename

Filename
rasterTmpFile

Temporary files
stretch

Stretch
rasterFromCells

Subset a raster by cell numbers
predict

Spatial model predictions
hdr

Header files
addLayer

Add or drop a layer
movingFun

Moving functions
sampleStratified

Stratified random sample
cellStats

Cell statistics
filledContour

Filled contour plot
scalebar

scalebar
pairs

Pairs plot (matrix of scatterplots)
intersect

Intersect Extent
projectRaster

Project a Raster object
KML

Write a KML or KMZ file
setMinMax

Compute min and max values
weighted.mean

Weighted mean of rasters
writeFormats

File types for writing
ncell

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

Write raster data to a file
rasterize

Rasterize points, lines, or polygons
as.matrix

Get a matrix with raster cell values
rasterFromXYZ

Create a RasterLayer from x, y, z values
resample

Resample a Raster object
Logic-methods

Logical operators and functions
unique

Unique values
layerStats

Correlation and (weighted) covariance
reclassify

Reclassify
atan2

Two argument arc-tangent
drawExtent

Create an Extent object by drawing on a map
blockSize

Block size for writing files
factors

Factors
hillShade

Hill shading
buffer

buffer
Compare-methods

Compare Raster* objects
approxNA

Estimate values for cells that are NA
NAvalue

Set the NA value of a RasterLayer
getValuesFocal

Get focal raster cell values
getValues

Get raster cell values
validNames

Create valid names
getValuesBlock

Get a block of raster cell values
as.raster

Coerce to a 'raster' object
unstack

Unstack
nlayers

Number of layers
scale

Scale values
autocorrelation

Spatial autocorrelation
plotRGB

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

Get or set a coordinate reference system (projection)
rasterToPoints

Raster to points conversion
Slope and aspect

Slope and aspect
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
compareRaster

Compare Raster objects
brick

Create a RasterBrick object
alignExtent

Align an extent (object of class Extent)
focal

Focal values
z-values

Get or set z-values
cover

Replace NA values with values of other layers
extract

Extract values from Raster objects
substitute

Substitute values in a Raster* object
image

Image
rotate

Rotate
shapefile

Read or write a shapefile
interpolate

Interpolate
sampleRandom

Random sample
inifile

Read a .ini file
mask

Mask values in a Raster object
terrain

Terrain characteristics
density

Density plot
Raster-class

Raster* classes
names

Names of raster layers
getData

Get geographic data
Programming

Helper functions for programming
xyFromCell

Coordinates from a row, column or cell number
plot

Plot a Raster* object
spplot

Use spplot to plot a Raster* object
union

Union Extent
Extent math

round Extent coordinates
setValues

Set values of a Raster object
overlay

Overlay Raster objects
validCell

Validity of a cell, column or row number
resolution

Resolution
persp

Perspective plot
boxplot

Box plot of Raster objects
Summary

Summary
trim

Trim
mosaic

Merge Raster* objects using a function for overlapping areas
select

Geometric subsetting
setExtent

Set the extent of a RasterLayer
rasterToContour

Raster to contour lines conversion
Options

Global options for the raster package
transpose

Transpose
which.min

Where is the min or max value?
crop

Crop
flip

Flip
match

Value matching for Raster* objects
origin

Origin
Math-methods

Mathematical functions
calc

Calculate
clamp

Clamp values
clump

Detect clumps
disaggregate

Disaggregate
extend

Extend
distanceFromPoints

Distance from points
freq

Frequency table
modal

modal value
quantile

Raster quantiles
raster

Create a RasterLayer object
aggregate

Aggregate cells
cluster

Use a multi-core cluster
cv

Coefficient of variation
direction

Direction
layerize

Layerize
rowFromCell

Row or column number from a cell number
SampleInt

Sample integer values
stackSelect

Select cell values from a multi-layer Raster* object