Learn R Programming

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

raster (version 3.0-2)

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. There is a also support for vector data operations such as intersections. See the manual and tutorials on to get started.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

136,047

Version

3.0-2

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

August 22nd, 2019

Functions in raster (3.0-2)

Summary-methods

Summary methods
approxNA

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

Size of cells
as.character

Character representation of a Raster or Extent object
as.data.frame

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

Bar plot of a RasterLayer
bands

Number of bands
as.matrix

Get a vector, matrix, or array with raster cell values
as.raster

Coerce to a 'raster' object
cellsFromExtent

Cells from extent, and vice versa
as.list

Create a list of RasterLayer objects
adjacent

Adjacent cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
cellStats

Statistics across cells
KML

Write a KML or KMZ file
alignExtent

Align an extent (object of class Extent)
animate

Animate layers of a Raster* object
clamp

Clamp values
addLayer

Add or drop a layer
brick

Create a RasterBrick object
cut

Convert values to classes
contour

Contour plot
Extreme coordinates

Coordinates of the Extent of a Raster object
cv

Coefficient of variation
blockSize

Block size for writing files
buffer

buffer
bind

Bind Spatial* objects
calc

Calculate
as.logical

Change cell values to logical or integer values
clearValues

Clear values
cellFrom

Get cell, row, or column number
autocorrelation

Spatial autocorrelation
colortable

colortable
cluster

Use a multi-core cluster
dataType

Data type
atan2

Two argument arc-tangent
datasource

Are values in memory and/or on disk?
erase

distance

Distance
compareRaster

Compare Raster objects
extend

Extend
flowPath

Flow path
dim

Dimensions of a Raster* object
getValues

Get raster cell values
density

Density plot
flip

Flip
distanceFromPoints

Distance from points
boundaries

boundaries (edges) detection
extremeValues

Minimum and maximum values
Extract by index

Indexing to extract values of a Raster* object
compareCRS

Partially compare two CRS objects
extract

Extract values from Raster objects
boxplot

Box plot of Raster objects
getValuesFocal

Get focal raster cell values
factors

Factors
localFun

Local functions
click

Query by clicking on a map
crop

Crop
clump

Detect clumps
gridDistance

Distance on a grid
names

Names of raster layers
image

Image
getValuesBlock

Get a block of raster cell values
inifile

Read a .ini file
ncell

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

Local correlation coefficient
merge

Merge Raster* objects
match

Value matching for Raster* objects
predict

Spatial model predictions
direction

Direction
cover

Replace NA values with values of other layers
extent

Extent
extension

Filename extensions
disaggregate

Disaggregate
draw

Draw a line or polygon
crosstab

Cross-tabulate
mask

Mask values in a Raster object
projectRaster

Project a Raster object
drawExtent

Create an Extent object by drawing on a map
metadata

Metadata
filledContour

Filled contour plot
hist

Histogram
filename

Filename
hillShade

Hill shading
layerStats

Correlation and (weighted) covariance
projection

Get or set a coordinate reference system (projection)
Options

Global options for the raster package
focal

Focal values
Gain and offset

Gain and offset of values on file
freq

Frequency table
focalWeight

Focal weights matrix
layerize

Layerize
rasterTmpFile

Temporary files
rotate

Rotate
rotated

Do the raster cells have a rotation?
head

Show the head or tail of a Raster* object
hdr

Header files
nlayers

Number of layers
pointDistance

Distance between points
rasterToContour

Raster to contour lines conversion
plotRGB

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

Origin
rasterToPoints

Raster to points conversion
resample

Resample a Raster object
isLonLat

Is this longitude/latitude data?
intersect

Intersect
Programming

Helper functions for programming
resolution

Resolution
rasterFromXYZ

Create a Raster* object from x, y, z values
reclassify

Reclassify
rasterFromCells

Subset a raster by cell numbers
readAll

Read values from disk
rowFromCell

Row or column number from a cell number
movingFun

Moving functions
persp

Perspective plot
mosaic

Merge Raster* objects using a function for overlapping areas
plot

Plot a Raster* object
raster-package

Overview of the functions in the raster package
modal

modal value
properties

Raster file properties
quantile

Raster quantiles
stack

Create a RasterStack object
Extent math

round Extent coordinates
round

Integer values
replacement

Replace cell values or layers of a Raster* object
stackSave

Save or open a RasterStack file
rectify

rectify a Raster object
scale

Scale values
geom

Get the coordinates of a vector type Spatial* object
raster

Create a RasterLayer object
shift

Shift
rowSums

rowSums and colSums for Raster objects
scalebar

scalebar
select

Geometric subsetting
Slope and aspect

Slope and aspect
getData

Get geographic data
sampleRegular

Regular sample
substitute

Substitute values in a Raster* object
stackSelect

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

Apply a function on subsets of a RasterStack or RasterBrick
union

Union Extent or SpatialPolygons* objects
unique

Unique values
overlay

Overlay Raster objects
pairs

Pairs plot (matrix of scatterplots)
initialize

Initialize a Raster object with values
interpolate

Interpolate
sampleStratified

Stratified random sample
which.min

Where is the min or max value?
rasterToPolygons

Raster to polygons conversion
sp

Create SpatialLines* or SpatialPolygons*
setValues

Set values of a Raster object
writeFormats

File types for writing
spplot

Use spplot to plot a Raster* or other object
zApply

z (time) apply
stretch

Stretch
xyFromCell

Coordinates from a row, column or cell number
transpose

Transpose
trim

Trim
shapefile

Read or write a shapefile
subset

Subset layers in a Raster* object
Summary

Summary
writeRaster

Write raster data to a file
SampleInt

Sample integer values
sampleRandom

Random sample
writeValues

Write values to a file
rasterize

Rasterize points, lines, or polygons
unstack

Unstack
update

Update raster cells of files (on disk)
symdif

Symetrical difference
weighted.mean

Weighted mean of rasters
setExtent

Set the extent of a RasterLayer
setMinMax

Compute min and max values
terrain

Terrain characteristics
which

Which cells are TRUE?
z-values

Get or set z-values
zonal

Zonal statistics
zoom

Zoom in on a map
validNames

Create valid names
text

Add labels to a map
validCell

Validity of a cell, column or row number
Compare-methods

Compare Raster* objects
RGB

Create a Red-Green-Blue Raster object
Raster-class

Raster* classes
Extent-class

Class "Extent"
Arith-methods

Arithmetic with Raster* objects
Rcpp-class

Rcpp classes
NAvalue

Set the NA value of a RasterLayer
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions