Learn R Programming

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

raster (version 2.3-10)

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. Processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

129,316

Version

2.3-10

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 16th, 2014

Functions in raster (2.3-10)

extent

Extent
Extract by index

Indexing to extract values of a Raster* object
filledContour

Filled contour plot
scale

Scale values
raster-package

Overview of the functions in the raster package
area

Size of cells
cellFrom

Get cell, row, or column number
NAvalue

Set the NA value of a RasterLayer
bind

Bind Spatial* objects
distanceFromPoints

Distance from points
subset

Subset layers in a Raster* object
setValues

Set values of a Raster object
names

Names of raster layers
boundaries

boundaries (edges) detection
cellsFromExtent

Cells from Extent
mosaic

Merge Raster* objects using a function for overlapping areas
Compare-methods

Compare Raster* objects
sampleStratified

Stratified random sample
distance

Distance
adjacent

Adjacent cells
bands

Number of bands
as.raster

Coerce to a 'raster' object
rasterize

Rasterize points, lines, or polygons
projection

Get or set a coordinate reference system (projection)
barplot

Bar plot of a RasterLayer
select

Geometric subsetting
setExtent

Set the extent of a RasterLayer
crosstab

Cross-tabulate
calc

Calculate
writeValues

Write values to a file
focalWeight

Focal weights matrix
dataType

Data type
Extent coordinates

Coordinates of the Extent of a Raster object
Gain and offset

Gain and offset of values on file
Math-methods

Mathematical functions
plot

Plot a Raster* object
merge

Merge Raster* objects
cover

Replace NA values with values of other layers
shapefile

Read or write a shapefile
Raster-class

Raster* classes
resample

Resample a Raster object
buffer

buffer
layerize

Layerize
alignExtent

Align an extent (object of class Extent)
validNames

Create valid names
getValues

Get raster cell values
Extent-class

Class "Extent"
click

Query by clicking on a map
reclassify

Reclassify
Summary-methods

Summary methods
round

Integer values
cluster

Use a multi-core cluster
rotate

Rotate
boxplot

Box plot of Raster objects
trim

Trim
draw

Draw a line or polygon
atan2

Two argument arc-tangent
as.data.frame

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

Zonal statistics
SampleInt

Sample integer values
stretch

Stretch
clearValues

Clear values
approxNA

Estimate values for cell values that are NA by interpolating between layers
compareRaster

Compare Raster objects
weighted.mean

Weighted mean of rasters
aggregate

Aggregate raster cells or polygons
blockSize

Block size for writing files
as.logical

Change values to logical
direction

Direction
KML

Write a KML or KMZ file
symdif

Symetrical difference
cellStats

Statistics across cells
gridDistance

Distance on a grid
animate

Animate layers of a Raster* object
crop

Crop
extend

Extend
compareCRS

Partially compare two CRS objects
drawExtent

Create an Extent object by drawing on a map
mask

Mask values in a Raster object
Summary

Summary
isLonLat

Is this longitude/latitude data?
getValuesBlock

Get a block of raster cell values
extension

Filename extensions
head

Show the head or tail of a Raster* object
quantile

Raster quantiles
modal

modal value
plotRGB

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

Extract values from Raster objects
movingFun

Moving functions
datasource

Are values in memory and/or on disk?
Logic-methods

Logical operators and functions
image

Image
RGB

Create a Red-Green-Blue Raster object
rasterToPolygons

Raster to polygons conversion
density

Density plot
pointDistance

Distance between points
inifile

Read a .ini file
erase

Erase parts of a Spatial* object
intersect

Intersect
clump

Detect clumps
rowFromCell

Row or column number from a cell number
focal

Focal values
rasterTmpFile

Temporary files
Slope and aspect

Slope and aspect
cut

Convert values to classes
Programming

Helper functions for programming
flowPath

Flow path
transpose

Transpose
extremeValues

Minimum and maximum values
Arith-methods

Arithmetic with Raster* objects
ncell

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

Histogram
getData

Get geographic data
flip

Flip
nlayers

Number of layers
readAll

Read values from disk
validCell

Validity of a cell, column or row number
which.min

Where is the min or max value?
resolution

Resolution
freq

Frequency table
stack

Create a RasterStack object
text

Add labels to a map
brick

Create a RasterBrick object
Extent math

round Extent coordinates
match

Value matching for Raster* objects
contour

Contour plot
layerStats

Correlation and (weighted) covariance
clamp

Clamp values
pairs

Pairs plot (matrix of scatterplots)
addLayer

Add or drop a layer
rasterToContour

Raster to contour lines conversion
persp

Perspective plot
getValuesFocal

Get focal raster cell values
hillShade

Hill shading
union

Union Extent or SpatialPolygons* objects
unstack

Unstack
raster

Create a RasterLayer object
writeFormats

File types for writing
metadata

Metadata
overlay

Overlay Raster objects
disaggregate

Disaggregate
localFun

Local functions
Options

Global options for the raster package
initialize

Intitialize a Raster object with values
origin

Origin
spplot

Use spplot to plot a Raster* object
as.matrix

Get a matrix with raster cell values
properties

Raster file properties
z-values

Get or set z-values
rasterFromXYZ

Create a RasterLayer from x, y, z values
autocorrelation

Spatial autocorrelation
stackSave

Save or open a RasterStack file
predict

Spatial model predictions
sampleRegular

Regular sample
setMinMax

Compute min and max values
corLocal

Local correlation coefficient
scalebar

scalebar
which

Which cells are TRUE?
zoom

Zoom in on a map
shift

Shift
unique

Unique values
projectRaster

Project a Raster object
xyFromCell

Coordinates from a row, column or cell number
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
rasterToPoints

Raster to points conversion
substitute

Substitute values in a Raster* object
cv

Coefficient of variation
zApply

z (time) apply
update

Update raster cells of files (on disk)
replacement

Replace cell values or layers of a Raster* object
filename

Filename
writeRaster

Write raster data to a file
dim

Dimensions of a Raster* object
factors

Factors
hdr

Header files
rotated

Do the raster cells have a rotation?
stackSelect

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

Random sample
rasterFromCells

Subset a raster by cell numbers
terrain

Terrain characteristics
rectify

rectify a Raster object
interpolate

Interpolate