Learn R Programming

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

raster (version 1.7-46)

Geographic analysis and modeling with raster data

Description

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

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

171,298

Version

1.7-46

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

February 27th, 2011

Functions in raster (1.7-46)

cellStats

Cell statistics
cut

Convert values to classes
cover

Replace NA values with values of other layers
Arith-methods

Arithmic with Raster* objects
direction

Direction
cellValues

Obsolete functions
addLayer

Add or drop a layer
cellFrom

Get cell, row, or column number
aggregate

Aggregate cells
count

Count
inifile

Read a .ini file
filename

Filename
mosaic

Merge RasterLayers using a function for overlapping areas
dataType

Data type
expand

Expand
extract

Extract values from Raster objects
origin

Origin
mask

Mask values in a Raster object
replacement

Extract or replace cell values of a Raster object
distance

Distance
calc

Calculate
head

Show the head or tail of the values of a RasterLaayer
isLonLat

Is this longitude/latitude data?
area

Size of cells
overlay

Overlay Raster objects
which

Which cells are TRUE?
NAvalue

Set the NA value of a RasterLayer
rasterToPolygons

Raster to polygons conversion
getValuesBlock

Get a block of raster cell values
bands

Number of bands
interpolate

Interpolate
disaggregate

Disaggregate
rasterToPoints

Raster to points conversion
Logic-methods

Logical operators and functions
plot3D

Interactive 3D plot of a RasterLayer
plot

Plot a Raster* object
reclass

Reclassify
SampleInt

Sample integer values
sampleRandom

Random sample
sampleRegular

Regular sample
Cluster

Use a multi-core (snow) cluster
crosstab

Cross-tabulate
nlayers

Number of layers
KML

Write a KML file
writeRaster

Write raster data to a file
clearValues

Clear values
resolution

Resolution
drawExtent

Create an Extent object by drawing on a map
brick

Create a RasterBrick object
zoom

Zoom in on a plot
raster-package

An overview of the functions in this package
extension

Filename extensions
rotate

Rotate
xyFromCell

Coordinates from a row, column or cell number
Extent coordinates

Coordinates of the Extent of a Raster object
intersectExtent

Extent intersection
readAll

Read values from disk
Compare-methods

Compare Raster* objects
setExtent

Set the extent of a RasteLayer
resample

Resample a Raster object
writeFormats

File types for writing
trim

Trim
subset

Subset layers in a Raster* object
dim

Dimensions of a Raster* object
image

Image
focalFilter

Focal filter
adjacency

Adjacency
extremeValues

Minimum and maximum values
Extent-class

Class "Extent"
rasterTmpFile

Temporary files
Math-methods

Mathematical functions
predict

Spatial model predictions
distanceFromPoints

Distance from points
cellsFromExtent

Cells from Extent
shift

Shift
datasource

Are values in memory and/or on disk?
compare

Compare
unstack

Unstack
crop

Crop
Options

Global options for the raster package
alignExtent

Align an extent (object of class Extent)
quantile

Raster quantiles
saverasterstack

Save or open a RasterStack file
click

Click on a map
getValues

Get raster cell values
raster

Create a RasterLayer object
ncell

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

Filled contour plot
hdr

Header files
gridDistance

Grid distance
contour

Contour plot
edge

Edge detection
pairs

Pairs plot (matrix of scatterplots)
setMinMax

Compute min and max values
rasterFromXYZ

Create a RasterLayer from x, y, z values
Programming

Helper functions for programming
zonal

Zonal statistics
round

Integer values
freq

Frequency table
rasterize

Rasterize points, lines, or polygons
Gain and offset

Gain and offset of values on file
unionExtent

Extent union
update

Update raster cells of files (on disk)
substitute

Substitute values in a RasterLayer
as.logical

Change values to logical
density

Density plot
rasterizeObsolete

Obsolete
setValues

Set values of a Raster object
as.matrix

Get a matrix with raster cell values
hist

Histogram
unique

Unique values
nudgeExtent

Round extent coordinates
initialize

Intitialize
writeValues

Write values to a file
validCell

Validity of a cell, column or row number
merge

Merge RasterLayers
draw

Draw a line or polygon
projection

Get or set a projection
extent

Extent
polygonFromExtent

Polygon from Extent
rasterFromCells

Subset a raster by cell numbers
rasterToContour

Raster to contour lines conversion
pointDistance

Distance between points
focal

Focal
Summary-methods

Summary methods
blockSize

Block size for writing files
Raster-class

Raster* classes
getData

Get geographic data
transpose

transpose
rowFromCell

Row or column number from a cell number
obsolete

Obsolete functions
persp

Perspective plot
boxplot

Box plot of Raster objects
plotRGB

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

Project a Raster object
stack

Create a RasterStack object
clump

Detect clumps
stats

Miscellaneous statistical functions
properties

Raster file properties
flip

Flip
factors

Factors
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
Summary

Summary