Learn R Programming

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

raster (version 2.0-31)

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

138,789

Version

2.0-31

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

November 10th, 2012

Functions in raster (2.0-31)

select

Geometric subsetting
filledContour

Filled contour plot
union

Union Extent
origin

Origin
rasterToContour

Raster to contour lines conversion
barplot

Bar plot of a RasterLayer
clump

Detect clumps
approxNA

Estimate values for cells that are NA
atan2

Two argument arc-tangent
Math-methods

Mathematical functions
addLayer

Add or drop a layer
Logic-methods

Logical operators and functions
image

Image
raster-package

Overview of the functions in the raster package
getValues

Get raster cell values
as.raster

Coerce to a 'raster' object
density

Density plot
Extent-class

Class "Extent"
extremeValues

Minimum and maximum values
freq

Frequency table
adjacent

Adjacent cells
mosaic

Merge Raster* objects using a function for overlapping areas
resample

Resample a Raster object
boxplot

Box plot of Raster objects
bands

Number of bands
dim

Dimensions of a Raster* object
flip

Flip
cluster

Use a multi-core cluster
crop

Crop
getValuesFocal

Get focal raster cell values
as.data.frame

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

Size of cells
cut

Convert values to classes
aggregate

Aggregate cells
Extent coordinates

Coordinates of the Extent of a Raster object
Raster-class

Raster* classes
as.logical

Change values to logical
hdr

Header files
adjacency

Pairs of adjacent cells
extension

Filename extensions
sampleStratified

Stratified random sample
scale

Scale values
cv

Coefficient of variation
alignExtent

Align an extent (object of class Extent)
Arith-methods

Arithmetic with Raster* objects
Compare-methods

Compare Raster* objects
crosstab

Cross-tabulate
isLonLat

Is this longitude/latitude data?
KML

Write a KML or KMZ file
gridDistance

Distance on a grid
Programming

Helper functions for programming
Extract by index

Indexing to extract values of a Raster* object
cellFrom

Get cell, row, or column number
brick

Create a RasterBrick object
rotate

Rotate
as.matrix

Get a matrix with raster cell values
merge

Merge Raster* objects
Extent math

round Extent coordinates
sampleRandom

Random sample
clearValues

Clear values
plotRGB

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

Edge detection
rasterize

Rasterize points, lines, or polygons
blockSize

Block size for writing files
drawExtent

Create an Extent object by drawing on a map
scalebar

scalebar
rectify

rectify a Raster object
filename

Filename
direction

Direction
layerize

Layerize
disaggregate

Disaggregate
Summary-methods

Summary methods
plot

Plot a Raster* object
cellStats

Cell statistics
rotated

Do the raster cells have a rotation?
quantile

Raster quantiles
dataType

Data type
focal

Focal values
SampleInt

Sample integer values
contour

Contour plot
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unique

Unique values
xyFromCell

Coordinates from a row, column or cell number
Obsolete

Obsolete (depracated) functions
text

Add labels to a map
extent

Extent
extend

Extend
calc

Calculate
distance

Distance
getValuesBlock

Get a block of raster cell values
autocorrelation

Spatial autocorrelation
datasource

Are values in memory and/or on disk?
inifile

Read a .ini file
hist

Histogram
substitute

Substitute values in a Raster* object
initialize

Intitialize
overlay

Overlay Raster objects
draw

Draw a line or polygon
transpose

Transpose
movingFun

Moving functions
compareRaster

Compare Raster objects
projectRaster

Project a Raster object
intersect

Intersect Extent
head

Show the head or tail of a Raster* object
rasterFromXYZ

Create a RasterLayer from x, y, z values
distanceFromPoints

Distance from points
round

Integer values
trim

Trim
properties

Raster file properties
rasterTmpFile

Temporary files
reclassify

Reclassify
zApply

z (time) apply
cellsFromExtent

Cells from Extent
click

Query by clicking on a map
rasterToPolygons

Raster to polygons conversion
terrain

Terrain characteristics
hillShade

Hill shading
nlayers

Number of layers
Summary

Summary
writeValues

Write values to a file
Gain and offset

Gain and offset of values on file
replacement

Replace cell values of a Raster* object
extract

Extract values from Raster objects
mask

Mask values in a Raster object
stackSave

Save or open a RasterStack file
projection

Get or set a coordinate reference system (projection)
setMinMax

Compute min and max values
ncell

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

Read values from disk
writeFormats

File types for writing
Options

Global options for the raster package
stack

Create a RasterStack object
names

Names of raster layers
stackSelect

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

Resolution
zoom

Zoom in on a plot
raster

Create a RasterLayer object
weighted.mean

Weighted mean of rasters
rasterToPoints

Raster to points conversion
rowFromCell

Row or column number from a cell number
validCell

Validity of a cell, column or row number
predict

Spatial model predictions
writeRaster

Write raster data to a file
pairs

Pairs plot (matrix of scatterplots)
setExtent

Set the extent of a RasterLayer
Slope and aspect

Slope and aspect
interpolate

Interpolate
subset

Subset layers in a Raster* object
setValues

Set values of a Raster object
sampleRegular

Regular sample
which

Which cells are TRUE?
shift

Shift
shapefile

Read or write a shapefile
rasterFromCells

Subset a raster by cell numbers
spplot

Use spplot to plot a Raster* object
z-values

Get or set z-values
unstack

Unstack
update

Update raster cells of files (on disk)
zonal

Zonal statistics
cover

Replace NA values with values of other layers
layerStats

Correlation and (weighted) covariance
pointDistance

Distance between points
NAvalue

Set the NA value of a RasterLayer
factors

Factors
buffer

buffer
getData

Get geographic data
modal

modal value
match

Value matching for Raster* objects
persp

Perspective plot