Learn R Programming

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

raster (version 2.1-41)

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

153,616

Version

2.1-41

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

July 2nd, 2013

Functions in raster (2.1-41)

barplot

Bar plot of a RasterLayer
as.raster

Coerce to a 'raster' object
calc

Calculate
Raster-class

Raster* classes
brick

Create a RasterBrick object
extension

Filename extensions
distanceFromPoints

Distance from points
Extent-class

Class "Extent"
initialize

Intitialize
flip

Flip
getValuesBlock

Get a block of raster cell values
cover

Replace NA values with values of other layers
rasterFromCells

Subset a raster by cell numbers
Extent coordinates

Coordinates of the Extent of a Raster object
layerStats

Correlation and (weighted) covariance
Math-methods

Mathematical functions
cellsFromExtent

Cells from Extent
autocorrelation

Spatial autocorrelation
inifile

Read a .ini file
cellStats

Cell statistics
crop

Crop
as.matrix

Get a matrix with raster cell values
as.data.frame

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

Filled contour plot
ncell

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

buffer
draw

Draw a line or polygon
adjacent

Adjacent cells
boxplot

Box plot of Raster objects
projectRaster

Project a Raster object
atan2

Two argument arc-tangent
drawExtent

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

Gain and offset of values on file
gridDistance

Distance on a grid
Logic-methods

Logical operators and functions
distance

Distance
clump

Detect clumps
as.logical

Change values to logical
zonal

Zonal statistics
density

Density plot
approxNA

Estimate values for cells that are NA
cv

Coefficient of variation
rasterFromXYZ

Create a RasterLayer from x, y, z values
dim

Dimensions of a Raster* object
datasource

Are values in memory and/or on disk?
intersect

Intersect Extent
extend

Extend
getValues

Get raster cell values
direction

Direction
head

Show the head or tail of a Raster* object
rasterTmpFile

Temporary files
addLayer

Add or drop a layer
substitute

Substitute values in a Raster* object
Extract by index

Indexing to extract values of a Raster* object
rasterToPolygons

Raster to polygons conversion
extremeValues

Minimum and maximum values
disaggregate

Disaggregate
sampleRandom

Random sample
predict

Spatial model predictions
hist

Histogram
quantile

Raster quantiles
extract

Extract values from Raster objects
sampleStratified

Stratified random sample
filename

Filename
contour

Contour plot
click

Query by clicking on a map
KML

Write a KML or KMZ file
extent

Extent
focal

Focal values
interpolate

Interpolate
reclassify

Reclassify
cellFrom

Get cell, row, or column number
origin

Origin
mask

Mask values in a Raster object
pointDistance

Distance between points
spplot

Use spplot to plot a Raster* object
NAvalue

Set the NA value of a RasterLayer
shapefile

Read or write a shapefile
Obsolete

Obsolete (depracated) functions
stackSave

Save or open a RasterStack file
area

Size of cells
update

Update raster cells of files (on disk)
names

Names of raster layers
cut

Convert values to classes
edge

Edge detection
image

Image
plotRGB

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

Focal weights matrix
xyFromCell

Coordinates from a row, column or cell number
nlayers

Number of layers
setMinMax

Compute min and max values
transpose

Transpose
persp

Perspective plot
overlay

Overlay Raster objects
scale

Scale values
Compare-methods

Compare Raster* objects
union

Union Extent
rectify

rectify a Raster object
freq

Frequency table
readAll

Read values from disk
resample

Resample a Raster object
writeRaster

Write raster data to a file
which.min

Where is the min or max value?
hillShade

Hill shading
mosaic

Merge Raster* objects using a function for overlapping areas
zApply

z (time) apply
rotate

Rotate
replacement

Replace cell values or layers of a Raster* object
raster-package

Overview of the functions in the raster package
rasterize

Rasterize points, lines, or polygons
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
rowFromCell

Row or column number from a cell number
zoom

Zoom in on a plot
Options

Global options for the raster package
weighted.mean

Weighted mean of rasters
select

Geometric subsetting
scalebar

scalebar
Summary

Summary
SampleInt

Sample integer values
writeFormats

File types for writing
Arith-methods

Arithmetic with Raster* objects
shift

Shift
z-values

Get or set z-values
text

Add labels to a map
writeValues

Write values to a file
rasterToPoints

Raster to points conversion
isLonLat

Is this longitude/latitude data?
alignExtent

Align an extent (object of class Extent)
bands

Number of bands
modal

modal value
which

Which cells are TRUE?
factors

Factors
round

Integer values
projection

Get or set a coordinate reference system (projection)
Extent math

round Extent coordinates
Slope and aspect

Slope and aspect
validCell

Validity of a cell, column or row number
stretch

Stretch
movingFun

Moving functions
unstack

Unstack
properties

Raster file properties
stack

Create a RasterStack object
sampleRegular

Regular sample
pairs

Pairs plot (matrix of scatterplots)
match

Value matching for Raster* objects
merge

Merge Raster* objects
setValues

Set values of a Raster object
resolution

Resolution
plot

Plot a Raster* object
rasterToContour

Raster to contour lines conversion
setExtent

Set the extent of a RasterLayer
rotated

Do the raster cells have a rotation?
terrain

Terrain characteristics
getValuesFocal

Get focal raster cell values
hdr

Header files
layerize

Layerize
unique

Unique values
trim

Trim
Summary-methods

Summary methods
aggregate

Aggregate cells
cluster

Use a multi-core cluster
compareRaster

Compare Raster objects
crosstab

Cross-tabulate
dataType

Data type
blockSize

Block size for writing files
clearValues

Clear values
getData

Get geographic data
raster

Create a RasterLayer object
Programming

Helper functions for programming
stackSelect

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

Subset layers in a Raster* object