Learn R Programming

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

raster (version 2.1-25)

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

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

April 12th, 2013

Functions in raster (2.1-25)

movingFun

Moving functions
autocorrelation

Spatial autocorrelation
clearValues

Clear values
setValues

Set values 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
hist

Histogram
barplot

Bar plot of a RasterLayer
click

Query by clicking on a map
rasterFromCells

Subset a raster by cell numbers
Compare-methods

Compare Raster* objects
cellStats

Cell statistics
extract

Extract values from Raster objects
cut

Convert values to classes
getValues

Get raster cell values
extend

Extend
rasterTmpFile

Temporary files
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
layerize

Layerize
blockSize

Block size for writing files
KML

Write a KML or KMZ file
adjacency

Pairs of adjacent cells
bands

Number of bands
raster-package

Overview of the functions in the raster package
flip

Flip
addLayer

Add or drop a layer
dataType

Data type
extension

Filename extensions
crop

Crop
as.raster

Coerce to a 'raster' object
persp

Perspective plot
sampleRandom

Random sample
Raster-class

Raster* classes
resample

Resample a Raster object
stackSave

Save or open a RasterStack file
nlayers

Number of layers
substitute

Substitute values in a Raster* object
adjacent

Adjacent cells
Summary-methods

Summary methods
hillShade

Hill shading
as.matrix

Get a matrix with raster cell values
setMinMax

Compute min and max values
direction

Direction
pairs

Pairs plot (matrix of scatterplots)
atan2

Two argument arc-tangent
compareRaster

Compare Raster objects
getData

Get geographic data
cv

Coefficient of variation
calc

Calculate
cellsFromExtent

Cells from Extent
select

Geometric subsetting
aggregate

Aggregate cells
buffer

buffer
zApply

z (time) apply
rasterFromXYZ

Create a RasterLayer from x, y, z values
Math-methods

Mathematical functions
approxNA

Estimate values for cells that are NA
NAvalue

Set the NA value of a RasterLayer
Obsolete

Obsolete (depracated) functions
draw

Draw a line or polygon
drawExtent

Create an Extent object by drawing on a map
contour

Contour plot
quantile

Raster quantiles
round

Integer values
hdr

Header files
alignExtent

Align an extent (object of class Extent)
distanceFromPoints

Distance from points
weighted.mean

Weighted mean of rasters
Slope and aspect

Slope and aspect
factors

Factors
union

Union Extent
intersect

Intersect Extent
cellFrom

Get cell, row, or column number
dim

Dimensions of a Raster* object
writeFormats

File types for writing
Arith-methods

Arithmetic with Raster* objects
cluster

Use a multi-core cluster
setExtent

Set the extent of a RasterLayer
disaggregate

Disaggregate
unstack

Unstack
Logic-methods

Logical operators and functions
head

Show the head or tail of a Raster* object
match

Value matching for Raster* objects
isLonLat

Is this longitude/latitude data?
Options

Global options for the raster package
origin

Origin
Extent-class

Class "Extent"
getValuesBlock

Get a block of raster cell values
merge

Merge Raster* objects
crosstab

Cross-tabulate
area

Size of cells
filename

Filename
plot

Plot a Raster* object
initialize

Intitialize
plotRGB

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

Coordinates from a row, column or cell number
resolution

Resolution
raster

Create a RasterLayer object
brick

Create a RasterBrick object
names

Names of raster layers
mosaic

Merge Raster* objects using a function for overlapping areas
inifile

Read a .ini file
trim

Trim
Extract by index

Indexing to extract values of a Raster* object
distance

Distance
clump

Detect clumps
filledContour

Filled contour plot
image

Image
rasterToPolygons

Raster to polygons conversion
unique

Unique values
projectRaster

Project a Raster object
stackSelect

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

Summary
pointDistance

Distance between points
z-values

Get or set z-values
rotated

Do the raster cells have a rotation?
Gain and offset

Gain and offset of values on file
validCell

Validity of a cell, column or row number
cover

Replace NA values with values of other layers
extremeValues

Minimum and maximum values
ncell

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

Write values to a file
Programming

Helper functions for programming
SampleInt

Sample integer values
reclassify

Reclassify
extent

Extent
zoom

Zoom in on a plot
which

Which cells are TRUE?
as.logical

Change values to logical
freq

Frequency table
writeRaster

Write raster data to a file
predict

Spatial model predictions
datasource

Are values in memory and/or on disk?
interpolate

Interpolate
modal

modal value
rasterize

Rasterize points, lines, or polygons
overlay

Overlay Raster objects
sampleRegular

Regular sample
sampleStratified

Stratified random sample
scale

Scale values
spplot

Use spplot to plot a Raster* object
layerStats

Correlation and (weighted) covariance
shapefile

Read or write a shapefile
update

Update raster cells of files (on disk)
stack

Create a RasterStack object
subset

Subset layers in a Raster* object
rotate

Rotate
replacement

Replace cell values of a Raster* object
edge

Edge detection
readAll

Read values from disk
mask

Mask values in a Raster object
focal

Focal values
gridDistance

Distance on a grid
zonal

Zonal statistics
properties

Raster file properties
scalebar

scalebar
getValuesFocal

Get focal raster cell values
text

Add labels to a map
rasterToContour

Raster to contour lines conversion
terrain

Terrain characteristics
rectify

rectify a Raster object
Extent math

round Extent coordinates
boxplot

Box plot of Raster objects
rasterToPoints

Raster to points conversion
shift

Shift
transpose

Transpose
Extent coordinates

Coordinates of the Extent of a Raster object
density

Density plot
rowFromCell

Row or column number from a cell number
projection

Get or set a coordinate reference system (projection)