Learn R Programming

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

raster (version 2.0-29)

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

120,924

Version

2.0-29

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

November 8th, 2012

Functions in raster (2.0-29)

Compare-methods

Compare Raster* objects
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
distanceFromPoints

Distance from points
Extent-class

Class "Extent"
barplot

Bar plot of a RasterLayer
clearValues

Clear values
bands

Number of bands
dim

Dimensions of a Raster* object
inifile

Read a .ini file
cellsFromExtent

Cells from Extent
atan2

Two argument arc-tangent
adjacent

Adjacent cells
area

Size of cells
addLayer

Add or drop a layer
as.data.frame

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

Pairs of adjacent cells
KML

Write a KML or KMZ file
aggregate

Aggregate cells
as.raster

Coerce to a 'raster' object
click

Query by clicking on a map
Raster-class

Raster* classes
boxplot

Box plot of Raster objects
approxNA

Estimate values for cells that are NA
contour

Contour plot
extremeValues

Minimum and maximum values
as.matrix

Get a matrix with raster cell values
extend

Extend
factors

Factors
Extent coordinates

Coordinates of the Extent of a Raster object
NAvalue

Set the NA value of a RasterLayer
cellFrom

Get cell, row, or column number
Arith-methods

Arithmetic with Raster* objects
projection

Get or set a coordinate reference system (projection)
alignExtent

Align an extent (object of class Extent)
freq

Frequency table
mask

Mask values in a Raster object
isLonLat

Is this longitude/latitude data?
crosstab

Cross-tabulate
rasterFromXYZ

Create a RasterLayer from x, y, z values
quantile

Raster quantiles
blockSize

Block size for writing files
filledContour

Filled contour plot
disaggregate

Disaggregate
projectRaster

Project a Raster object
direction

Direction
density

Density plot
stackSave

Save or open a RasterStack file
cluster

Use a multi-core cluster
calc

Calculate
hist

Histogram
crop

Crop
hdr

Header files
initialize

Intitialize
plot

Plot a Raster* object
extract

Extract values from Raster objects
cellStats

Cell statistics
getValuesBlock

Get a block of raster cell values
extension

Filename extensions
hillShade

Hill shading
extent

Extent
compareRaster

Compare Raster objects
interpolate

Interpolate
rasterToPolygons

Raster to polygons conversion
clump

Detect clumps
cv

Coefficient of variation
validCell

Validity of a cell, column or row number
movingFun

Moving functions
intersect

Intersect Extent
match

Value matching for Raster* objects
brick

Create a RasterBrick object
buffer

buffer
flip

Flip
dataType

Data type
edge

Edge detection
distance

Distance
rasterToPoints

Raster to points conversion
cut

Convert values to classes
drawExtent

Create an Extent object by drawing on a map
Gain and offset

Gain and offset of values on file
setMinMax

Compute min and max values
as.logical

Change values to logical
gridDistance

Distance on a grid
rasterFromCells

Subset a raster by cell numbers
cover

Replace NA values with values of other layers
origin

Origin
getData

Get geographic data
rasterToContour

Raster to contour lines conversion
overlay

Overlay Raster objects
Extent math

round Extent coordinates
pointDistance

Distance between points
filename

Filename
getValuesFocal

Get focal raster cell values
readAll

Read values from disk
update

Update raster cells of files (on disk)
xyFromCell

Coordinates from a row, column or cell number
autocorrelation

Spatial autocorrelation
mosaic

Merge Raster* objects using a function for overlapping areas
rotated

Do the raster cells have a rotation?
focal

Focal values
head

Show the head or tail of a Raster* object
rotate

Rotate
nlayers

Number of layers
properties

Raster file properties
rasterTmpFile

Temporary files
ncell

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

Layerize
resample

Resample a Raster object
rowFromCell

Row or column number from a cell number
sampleRegular

Regular sample
resolution

Resolution
replacement

Replace cell values of a Raster* object
sampleStratified

Stratified random sample
round

Integer values
shift

Shift
setExtent

Set the extent of a RasterLayer
raster

Create a RasterLayer object
image

Image
spplot

Use spplot to plot a Raster* object
transpose

Transpose
stackSelect

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

modal value
zApply

z (time) apply
merge

Merge Raster* objects
weighted.mean

Weighted mean of rasters
raster-package

Overview of the functions in the raster package
persp

Perspective plot
Obsolete

Obsolete (depracated) functions
z-values

Get or set z-values
Slope and aspect

Slope and aspect
stack

Create a RasterStack object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
zonal

Zonal statistics
select

Geometric subsetting
SampleInt

Sample integer values
Options

Global options for the raster package
reclassify

Reclassify
which

Which cells are TRUE?
zoom

Zoom in on a plot
substitute

Substitute values in a Raster* object
writeValues

Write values to a file
scalebar

scalebar
Programming

Helper functions for programming
subset

Subset layers in a Raster* object
shapefile

Read or write a shapefile
sampleRandom

Random sample
writeRaster

Write raster data to a file
union

Union Extent
names

Names of raster layers
writeFormats

File types for writing
scale

Scale values
Summary

Summary
rectify

rectify a Raster object
rasterize

Rasterize points, lines, or polygons
text

Add labels to a map
trim

Trim
terrain

Terrain characteristics
datasource

Are values in memory and/or on disk?
draw

Draw a line or polygon
getValues

Get raster cell values
layerStats

Correlation and (weighted) covariance
predict

Spatial model predictions
unique

Unique values
Summary-methods

Summary methods
Extract by index

Indexing to extract values of a Raster* object
pairs

Pairs plot (matrix of scatterplots)
plotRGB

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

Set values of a Raster object
unstack

Unstack