Learn R Programming

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

raster (version 2.1-49)

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-49

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

July 11th, 2013

Functions in raster (2.1-49)

addLayer

Add or drop a layer
cellFrom

Get cell, row, or column number
disaggregate

Disaggregate
interpolate

Interpolate
Extent-class

Class "Extent"
head

Show the head or tail of a Raster* object
Raster-class

Raster* classes
hdr

Header files
cluster

Use a multi-core cluster
draw

Draw a line or polygon
as.matrix

Get a matrix with raster cell values
clearValues

Clear values
persp

Perspective plot
nlayers

Number of layers
plotRGB

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

Helper functions for programming
resample

Resample a Raster object
barplot

Bar plot of a RasterLayer
cellStats

Cell statistics
cellsFromExtent

Cells from Extent
Math-methods

Mathematical functions
Extent coordinates

Coordinates of the Extent of a Raster object
approxNA

Estimate values for cells that are NA
contour

Contour plot
cut

Convert values to classes
drawExtent

Create an Extent object by drawing on a map
replacement

Replace cell values or layers of a Raster* object
NAvalue

Set the NA value of a RasterLayer
getValuesFocal

Get focal raster cell values
image

Image
extend

Extend
aggregate

Aggregate cells
datasource

Are values in memory and/or on disk?
extent

Extent
edge

Edge detection
adjacent

Adjacent cells
ncell

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

Reclassify
distance

Distance
scalebar

scalebar
Arith-methods

Arithmetic with Raster* objects
KML

Write a KML or KMZ file
trim

Trim
density

Density plot
as.logical

Change values to logical
validCell

Validity of a cell, column or row number
rasterize

Rasterize points, lines, or polygons
writeValues

Write values to a file
clump

Detect clumps
inifile

Read a .ini file
zonal

Zonal statistics
SampleInt

Sample integer values
xyFromCell

Coordinates from a row, column or cell number
rotate

Rotate
cv

Coefficient of variation
getValues

Get raster cell values
plot

Plot a Raster* object
stackSave

Save or open a RasterStack file
writeRaster

Write raster data to a file
flip

Flip
Gain and offset

Gain and offset of values on file
layerStats

Correlation and (weighted) covariance
bands

Number of bands
getValuesBlock

Get a block of raster cell values
setValues

Set values of a Raster object
brick

Create a RasterBrick object
intersect

Intersect Extent
crop

Crop
projectRaster

Project a Raster object
filename

Filename
Options

Global options for the raster package
projection

Get or set a coordinate reference system (projection)
readAll

Read values from disk
merge

Merge Raster* objects
pointDistance

Distance between points
mosaic

Merge Raster* objects using a function for overlapping areas
Extract by index

Indexing to extract values of a Raster* object
names

Names of raster layers
resolution

Resolution
setExtent

Set the extent of a RasterLayer
layerize

Layerize
cover

Replace NA values with values of other layers
alignExtent

Align an extent (object of class Extent)
select

Geometric subsetting
overlay

Overlay Raster objects
spplot

Use spplot to plot a Raster* object
rasterToPoints

Raster to points conversion
writeFormats

File types for writing
origin

Origin
predict

Spatial model predictions
properties

Raster file properties
extremeValues

Minimum and maximum values
which.min

Where is the min or max value?
stack

Create a RasterStack object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
pairs

Pairs plot (matrix of scatterplots)
movingFun

Moving functions
rasterToPolygons

Raster to polygons conversion
update

Update raster cells of files (on disk)
sampleRandom

Random sample
unstack

Unstack
raster-package

Overview of the functions in the raster package
rotated

Do the raster cells have a rotation?
Extent math

round Extent coordinates
unique

Unique values
quantile

Raster quantiles
initialize

Intitialize
Logic-methods

Logical operators and functions
gridDistance

Distance on a grid
extension

Filename extensions
text

Add labels to a map
Summary-methods

Summary methods
focal

Focal values
zApply

z (time) apply
crosstab

Cross-tabulate
which

Which cells are TRUE?
hist

Histogram
click

Query by clicking on a map
mask

Mask values in a Raster object
rasterToContour

Raster to contour lines conversion
substitute

Substitute values in a Raster* object
z-values

Get or set z-values
match

Value matching for Raster* objects
focalWeight

Focal weights matrix
rowFromCell

Row or column number from a cell number
getData

Get geographic data
filledContour

Filled contour plot
boxplot

Box plot of Raster objects
rasterFromXYZ

Create a RasterLayer from x, y, z values
blockSize

Block size for writing files
Slope and aspect

Slope and aspect
hillShade

Hill shading
raster

Create a RasterLayer object
autocorrelation

Spatial autocorrelation
direction

Direction
rectify

rectify a Raster object
setMinMax

Compute min and max values
rasterTmpFile

Temporary files
distanceFromPoints

Distance from points
isLonLat

Is this longitude/latitude data?
stretch

Stretch
weighted.mean

Weighted mean of rasters
factors

Factors
union

Union Extent
zoom

Zoom in on a plot
shift

Shift
rasterFromCells

Subset a raster by cell numbers
modal

modal value
atan2

Two argument arc-tangent
area

Size of cells
calc

Calculate
dim

Dimensions of a Raster* object
freq

Frequency table
dataType

Data type
sampleRegular

Regular sample
terrain

Terrain characteristics
transpose

Transpose
Compare-methods

Compare Raster* objects
buffer

buffer
as.raster

Coerce to a 'raster' object
extract

Extract values from Raster objects
round

Integer values
scale

Scale values
stackSelect

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

Summary
sampleStratified

Stratified random sample
as.data.frame

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

Compare Raster objects
shapefile

Read or write a shapefile
subset

Subset layers in a Raster* object