Learn R Programming

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

raster (version 2.1-16)

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

125,710

Version

2.1-16

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

March 13th, 2013

Functions in raster (2.1-16)

NAvalue

Set the NA value of a RasterLayer
cellFrom

Get cell, row, or column number
Math-methods

Mathematical functions
blockSize

Block size for writing files
cover

Replace NA values with values of other layers
compareRaster

Compare Raster objects
intersect

Intersect Extent
crosstab

Cross-tabulate
Arith-methods

Arithmetic with Raster* objects
extend

Extend
getValuesBlock

Get a block of raster cell values
adjacent

Adjacent cells
plotRGB

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

modal value
alignExtent

Align an extent (object of class Extent)
nlayers

Number of layers
extremeValues

Minimum and maximum values
as.logical

Change values to logical
Summary-methods

Summary methods
approxNA

Estimate values for cells that are NA
rasterToPoints

Raster to points conversion
rasterFromCells

Subset a raster by cell numbers
Extent-class

Class "Extent"
writeRaster

Write raster data to a file
contour

Contour plot
setValues

Set values of a Raster object
trim

Trim
shift

Shift
clump

Detect clumps
text

Add labels to a map
cv

Coefficient of variation
cut

Convert values to classes
layerStats

Correlation and (weighted) covariance
validCell

Validity of a cell, column or row number
buffer

buffer
movingFun

Moving functions
as.raster

Coerce to a 'raster' object
cluster

Use a multi-core cluster
persp

Perspective plot
extract

Extract values from Raster objects
bands

Number of bands
cellsFromExtent

Cells from Extent
Extent coordinates

Coordinates of the Extent of a Raster object
transpose

Transpose
match

Value matching for Raster* objects
aggregate

Aggregate cells
disaggregate

Disaggregate
projection

Get or set a coordinate reference system (projection)
clearValues

Clear values
draw

Draw a line or polygon
filledContour

Filled contour plot
KML

Write a KML or KMZ file
hist

Histogram
extent

Extent
drawExtent

Create an Extent object by drawing on a map
Slope and aspect

Slope and aspect
filename

Filename
Logic-methods

Logical operators and functions
properties

Raster file properties
addLayer

Add or drop a layer
overlay

Overlay Raster objects
rotate

Rotate
factors

Factors
calc

Calculate
resolution

Resolution
click

Query by clicking on a map
dataType

Data type
rasterTmpFile

Temporary files
focal

Focal values
stackSelect

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

Get raster cell values
datasource

Are values in memory and/or on disk?
select

Geometric subsetting
ncell

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

Raster* classes
rectify

rectify a Raster object
raster-package

Overview of the functions in the raster package
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
Obsolete

Obsolete (depracated) functions
direction

Direction
origin

Origin
rasterFromXYZ

Create a RasterLayer from x, y, z values
rasterize

Rasterize points, lines, or polygons
getData

Get geographic data
flip

Flip
sampleRandom

Random sample
image

Image
mask

Mask values in a Raster object
merge

Merge Raster* objects
resample

Resample a Raster object
stackSave

Save or open a RasterStack file
as.data.frame

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

Bar plot of a RasterLayer
Gain and offset

Gain and offset of values on file
unstack

Unstack
round

Integer values
rasterToContour

Raster to contour lines conversion
atan2

Two argument arc-tangent
cellStats

Cell statistics
density

Density plot
writeFormats

File types for writing
Summary

Summary
which

Which cells are TRUE?
projectRaster

Project a Raster object
Options

Global options for the raster package
edge

Edge detection
distance

Distance
SampleInt

Sample integer values
dim

Dimensions of a Raster* object
pairs

Pairs plot (matrix of scatterplots)
gridDistance

Distance on a grid
rotated

Do the raster cells have a rotation?
initialize

Intitialize
readAll

Read values from disk
setExtent

Set the extent of a RasterLayer
Extent math

round Extent coordinates
head

Show the head or tail of a Raster* object
scalebar

scalebar
terrain

Terrain characteristics
union

Union Extent
substitute

Substitute values in a Raster* object
weighted.mean

Weighted mean of rasters
inifile

Read a .ini file
mosaic

Merge Raster* objects using a function for overlapping areas
distanceFromPoints

Distance from points
rowFromCell

Row or column number from a cell number
shapefile

Read or write a shapefile
Compare-methods

Compare Raster* objects
xyFromCell

Coordinates from a row, column or cell number
zApply

z (time) apply
stack

Create a RasterStack object
pointDistance

Distance between points
Programming

Helper functions for programming
area

Size of cells
hdr

Header files
brick

Create a RasterBrick object
names

Names of raster layers
zoom

Zoom in on a plot
sampleStratified

Stratified random sample
scale

Scale values
autocorrelation

Spatial autocorrelation
plot

Plot a Raster* object
update

Update raster cells of files (on disk)
writeValues

Write values to a file
predict

Spatial model predictions
as.matrix

Get a matrix with raster cell values
freq

Frequency table
unique

Unique values
extension

Filename extensions
boxplot

Box plot of Raster objects
sampleRegular

Regular sample
hillShade

Hill shading
subset

Subset layers in a Raster* object
zonal

Zonal statistics
quantile

Raster quantiles
setMinMax

Compute min and max values
layerize

Layerize
replacement

Replace cell values of a Raster* object
adjacency

Pairs of adjacent cells
crop

Crop
getValuesFocal

Get focal raster cell values
raster

Create a RasterLayer object
reclassify

Reclassify
isLonLat

Is this longitude/latitude data?
Extract by index

Indexing to extract values of a Raster* object
rasterToPolygons

Raster to polygons conversion
spplot

Use spplot to plot a Raster* object
z-values

Get or set z-values
interpolate

Interpolate