Learn R Programming

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

raster (version 2.7-15)

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

153,616

Version

2.7-15

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

October 16th, 2018

Functions in raster (2.7-15)

Extent-class

Class "Extent"
KML

Write a KML or KMZ file
Logic-methods

Logical operators and functions
Math-methods

Mathematical functions
Summary-methods

Summary methods
adjacent

Adjacent cells
addLayer

Add or drop a layer
atan2

Two argument arc-tangent
as.raster

Coerce to a 'raster' object
aggregate

Aggregate raster cells or SpatialPolygons/Lines
buffer

buffer
Arith-methods

Arithmetic with Raster* objects
calc

Calculate
clamp

Clamp values
cellsFromExtent

Cells from extent, and vice versa
cover

Replace NA values with values of other layers
colortable

colortable
crop

Crop
datasource

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

Compare Raster* objects
compareRaster

Compare Raster objects
density

Density plot
Extract by index

Indexing to extract values of a Raster* object
flowPath

Flow path
Raster-class

Raster* classes
autocorrelation

Spatial autocorrelation
extremeValues

Minimum and maximum values
Gain and offset

Gain and offset of values on file
geom

Get the coordinates of a vector type Spatial* object
bands

Number of bands
as.data.frame

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

Get a block of raster cell values
as.list

Create a list of RasterLayer objects
Extreme coordinates

Coordinates of the Extent of a Raster object
Rcpp-class

Rcpp classes
corLocal

Local correlation coefficient
focal

Focal values
barplot

Bar plot of a RasterLayer
approxNA

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

Cross-tabulate
area

Size of cells
bind

Bind Spatial* objects
cellFrom

Get cell, row, or column number
disaggregate

Disaggregate
cellStats

Statistics across cells
inifile

Read a .ini file
RGB

Create a Red-Green-Blue Raster object
NAvalue

Set the NA value of a RasterLayer
initialize

Intitialize a Raster object with values
alignExtent

Align an extent (object of class Extent)
distance

Distance
brick

Create a RasterBrick object
contour

Contour plot
blockSize

Block size for writing files
animate

Animate layers of a Raster* object
boxplot

Box plot of Raster objects
as.logical

Change cell values to logical or integer values
as.matrix

Get a vector, matrix, or array with raster cell values
compareCRS

Partially compare two CRS objects
dim

Dimensions of a Raster* object
cut

Convert values to classes
getValuesFocal

Get focal raster cell values
direction

Direction
drawExtent

Create an Extent object by drawing on a map
movingFun

Moving functions
extend

Extend
extension

Filename extensions
names

Names of raster layers
distanceFromPoints

Distance from points
boundaries

boundaries (edges) detection
merge

Merge Raster* objects
clearValues

Clear values
erase

draw

Draw a line or polygon
Programming

Helper functions for programming
click

Query by clicking on a map
focalWeight

Focal weights matrix
metadata

Metadata
head

Show the head or tail of a Raster* object
freq

Frequency table
pointDistance

Distance between points
factors

Factors
hillShade

Hill shading
predict

Spatial model predictions
filename

Filename
getData

Get geographic data
getValues

Get raster cell values
clump

Detect clumps
mask

Mask values in a Raster object
cluster

Use a multi-core cluster
cv

Coefficient of variation
rasterize

Rasterize points, lines, or polygons
readAll

Read values from disk
isLonLat

Is this longitude/latitude data?
rowSums

rowSums and colSums for Raster objects
dataType

Data type
SampleInt

Sample integer values
spplot

Use spplot to plot a Raster* object
extent

Extent
layerStats

Correlation and (weighted) covariance
projectRaster

Project a Raster object
match

Value matching for Raster* objects
rasterTmpFile

Temporary files
modal

modal value
validNames

Create valid names
Summary

Summary
substitute

Substitute values in a Raster* object
stack

Create a RasterStack object
rasterToContour

Raster to contour lines conversion
extract

Extract values from Raster objects
plot

Plot a Raster* object
rasterFromCells

Subset a raster by cell numbers
reclassify

Reclassify
resolution

Resolution
raster

Create a RasterLayer object
plotRGB

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

Rotate
mosaic

Merge Raster* objects using a function for overlapping areas
quantile

Raster quantiles
weighted.mean

Weighted mean of rasters
select

Geometric subsetting
rectify

rectify a Raster object
hist

Histogram
writeFormats

File types for writing
rotated

Do the raster cells have a rotation?
raster-package

Overview of the functions in the raster package
scale

Scale values
setExtent

Set the extent of a RasterLayer
image

Image
round

Integer values
layerize

Layerize
filledContour

Filled contour plot
scalebar

scalebar
flip

Flip
gridDistance

Distance on a grid
writeRaster

Write raster data to a file
sampleStratified

Stratified random sample
hdr

Header files
localFun

Local functions
interpolate

Interpolate
ncell

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

Compute min and max values
nlayers

Number of layers
stackSave

Save or open a RasterStack file
setValues

Set values of a Raster object
unique

Unique values
pairs

Pairs plot (matrix of scatterplots)
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unstack

Unstack
stretch

Stretch
sp

Create SpatialLines* or SpatialPolygons*
persp

Perspective plot
Slope and aspect

Slope and aspect
zApply

z (time) apply
zonal

Zonal statistics
stackSelect

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

Intersect
which.min

Where is the min or max value?
which

Which cells are TRUE?
rasterToPoints

Raster to points conversion
overlay

Overlay Raster objects
origin

Origin
projection

Get or set a coordinate reference system (projection)
properties

Raster file properties
rasterFromXYZ

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

Subset layers in a Raster* object
update

Update raster cells of files (on disk)
rasterToPolygons

Raster to polygons conversion
validCell

Validity of a cell, column or row number
Options

Global options for the raster package
replacement

Replace cell values or layers of a Raster* object
Extent math

round Extent coordinates
resample

Resample a Raster object
sampleRandom

Random sample
sampleRegular

Regular sample
rowFromCell

Row or column number from a cell number
shapefile

Read or write a shapefile
symdif

Symetrical difference
shift

Shift
terrain

Terrain characteristics
text

Add labels to a map
trim

Trim
transpose

Transpose
writeValues

Write values to a file
union

Union Extent or SpatialPolygons* objects
zoom

Zoom in on a map
xyFromCell

Coordinates from a row, column or cell number
z-values

Get or set z-values