Learn R Programming

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

raster (version 2.1-12)

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

240,251

Version

2.1-12

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

March 12th, 2013

Functions in raster (2.1-12)

adjacency

Pairs of adjacent cells
extend

Extend
NAvalue

Set the NA value of a RasterLayer
KML

Write a KML or KMZ file
boxplot

Box plot of Raster objects
ncell

Number or rows, columns, and cells of a Raster* object
as.data.frame

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

Replace NA values with values of other layers
area

Size of cells
contour

Contour plot
adjacent

Adjacent cells
barplot

Bar plot of a RasterLayer
distanceFromPoints

Distance from points
aggregate

Aggregate cells
Raster-class

Raster* classes
atan2

Two argument arc-tangent
Arith-methods

Arithmetic with Raster* objects
setMinMax

Compute min and max values
as.raster

Coerce to a 'raster' object
inifile

Read a .ini file
calc

Calculate
cellStats

Cell statistics
cluster

Use a multi-core cluster
Compare-methods

Compare Raster* objects
gridDistance

Distance on a grid
dim

Dimensions of a Raster* object
click

Query by clicking on a map
intersect

Intersect Extent
datasource

Are values in memory and/or on disk?
cut

Convert values to classes
getValuesBlock

Get a block of raster cell values
rasterFromCells

Subset a raster by cell numbers
projection

Get or set a coordinate reference system (projection)
Logic-methods

Logical operators and functions
addLayer

Add or drop a layer
resolution

Resolution
clump

Detect clumps
Extent-class

Class "Extent"
Math-methods

Mathematical functions
direction

Direction
alignExtent

Align an extent (object of class Extent)
Extract by index

Indexing to extract values of a Raster* object
readAll

Read values from disk
union

Union Extent
factors

Factors
dataType

Data type
update

Update raster cells of files (on disk)
head

Show the head or tail of a Raster* object
xyFromCell

Coordinates from a row, column or cell number
stackSelect

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

Get cell, row, or column number
unstack

Unstack
drawExtent

Create an Extent object by drawing on a map
movingFun

Moving functions
plotRGB

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

Number of bands
cv

Coefficient of variation
Summary-methods

Summary methods
extract

Extract values from Raster objects
blockSize

Block size for writing files
flip

Flip
as.logical

Change values to logical
rasterize

Rasterize points, lines, or polygons
filledContour

Filled contour plot
layerize

Layerize
predict

Spatial model predictions
approxNA

Estimate values for cells that are NA
image

Image
SampleInt

Sample integer values
stackSave

Save or open a RasterStack file
mask

Mask values in a Raster object
rotated

Do the raster cells have a rotation?
brick

Create a RasterBrick object
modal

modal value
Extent math

round Extent coordinates
freq

Frequency table
Obsolete

Obsolete (depracated) functions
extremeValues

Minimum and maximum values
buffer

buffer
as.matrix

Get a matrix with raster cell values
Extent coordinates

Coordinates of the Extent of a Raster object
hist

Histogram
crop

Crop
which

Which cells are TRUE?
projectRaster

Project a Raster object
resample

Resample a Raster object
cellsFromExtent

Cells from Extent
density

Density plot
compareRaster

Compare Raster objects
isLonLat

Is this longitude/latitude data?
nlayers

Number of layers
properties

Raster file properties
clearValues

Clear values
filename

Filename
draw

Draw a line or polygon
rasterToContour

Raster to contour lines conversion
pairs

Pairs plot (matrix of scatterplots)
initialize

Intitialize
scale

Scale values
rowFromCell

Row or column number from a cell number
rotate

Rotate
match

Value matching for Raster* objects
plot

Plot a Raster* object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
merge

Merge Raster* objects
disaggregate

Disaggregate
writeRaster

Write raster data to a file
shapefile

Read or write a shapefile
autocorrelation

Spatial autocorrelation
zApply

z (time) apply
crosstab

Cross-tabulate
validCell

Validity of a cell, column or row number
extent

Extent
Slope and aspect

Slope and aspect
trim

Trim
hillShade

Hill shading
edge

Edge detection
scalebar

scalebar
getData

Get geographic data
names

Names of raster layers
raster

Create a RasterLayer object
quantile

Raster quantiles
overlay

Overlay Raster objects
setExtent

Set the extent of a RasterLayer
Gain and offset

Gain and offset of values on file
select

Geometric subsetting
Programming

Helper functions for programming
hdr

Header files
rasterFromXYZ

Create a RasterLayer from x, y, z values
zoom

Zoom in on a plot
round

Integer values
rasterToPolygons

Raster to polygons conversion
rasterToPoints

Raster to points conversion
sampleRegular

Regular sample
subset

Subset layers in a Raster* object
extension

Filename extensions
transpose

Transpose
spplot

Use spplot to plot a Raster* object
writeValues

Write values to a file
z-values

Get or set z-values
pointDistance

Distance between points
shift

Shift
text

Add labels to a map
sampleStratified

Stratified random sample
unique

Unique values
terrain

Terrain characteristics
sampleRandom

Random sample
getValuesFocal

Get focal raster cell values
interpolate

Interpolate
persp

Perspective plot
distance

Distance
focal

Focal values
layerStats

Correlation and (weighted) covariance
rasterTmpFile

Temporary files
stack

Create a RasterStack object
writeFormats

File types for writing
getValues

Get raster cell values
origin

Origin
Options

Global options for the raster package
reclassify

Reclassify
raster-package

Overview of the functions in the raster package
setValues

Set values of a Raster object
Summary

Summary
zonal

Zonal statistics
weighted.mean

Weighted mean of rasters
mosaic

Merge Raster* objects using a function for overlapping areas
rectify

rectify a Raster object
replacement

Replace cell values of a Raster* object
substitute

Substitute values in a Raster* object