Learn R Programming

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

raster (version 3.1-5)

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

109,462

Version

3.1-5

License

GPL (>= 3)

Maintainer

Last Published

April 19th, 2020

Functions in raster (3.1-5)

addLayer

Add or drop a layer
Arith-methods

Arithmetic with Raster* objects
Raster-class

Raster* classes
NAvalue

Set the NA value of a RasterLayer
Rcpp-class

Rcpp classes
Compare-methods

Compare Raster* objects
adjacent

Adjacent cells
RGB

Create a Red-Green-Blue Raster object
KML

Write a KML or KMZ file
Extent-class

Class "Extent"
Math-methods

Mathematical functions
Summary-methods

Summary methods
approxNA

Estimate values for cell values that are NA by interpolating between layers
as.character

Character representation of a Raster or Extent object
animate

Animate layers of a Raster* object
area

Size of cells
aggregate

Aggregate raster cells or SpatialPolygons/Lines
as.data.frame

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

Align an extent (object of class Extent)
as.list

Create a list of RasterLayer objects
bands

Number of bands
barplot

Bar plot of a RasterLayer
autocorrelation

Spatial autocorrelation
blockSize

Block size for writing files
bind

Bind Spatial* objects
as.logical

Change cell values to logical or integer values
as.matrix

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

Two argument arc-tangent
cellStats

Statistics across cells
cellsFromExtent

Cells from extent, and vice versa
as.raster

Coerce to a 'raster' object
boundaries

boundaries (edges) detection
brick

Create a RasterBrick object
buffer

buffer
Extreme coordinates

Coordinates of the Extent of a Raster object
contour

Contour plot
boxplot

Box plot of Raster objects
corLocal

Local correlation coefficient
compareRaster

Compare Raster objects
calc

Calculate
compareCRS

Partially compare two CRS objects
dim

Dimensions of a Raster* object
cellFrom

Get cell, row, or column number
density

Density plot
click

Query by clicking on a map
cover

Replace NA values with values of other layers
clump

Detect clumps
clamp

Clamp values
crop

Crop
drawExtent

Create an Extent object by drawing on a map
clearValues

Clear values
cut

Convert values to classes
crosstab

Cross-tabulate
draw

Draw a line or polygon
filename

Filename
extract

Extract values from Raster objects
dataType

Data type
Extract by index

Indexing to extract values of a Raster* object
cv

Coefficient of variation
colortable

colortable
filledContour

Filled contour plot
cluster

Use a multi-core cluster
datasource

Are values in memory and/or on disk?
getData

Get geographic data
geom

Get the coordinates of a vector type Spatial* object
focal

Focal values
image

Image
distanceFromPoints

Distance from points
focalWeight

Focal weights matrix
direction

Direction
distance

Distance
erase

disaggregate

Disaggregate
inifile

Read a .ini file
origin

Origin
extension

Filename extensions
nlayers

Number of layers
extremeValues

Minimum and maximum values
flip

Flip
extend

Extend
getValues

Get raster cell values
getValuesBlock

Get a block of raster cell values
factors

Factors
freq

Frequency table
extent

Extent
Gain and offset

Gain and offset of values on file
names

Names of raster layers
hillShade

Hill shading
initialize

Initialize a Raster object with values
hdr

Header files
head

Show the head or tail of a Raster* object
hist

Histogram
pairs

Pairs plot (matrix of scatterplots)
overlay

Overlay Raster objects
flowPath

Flow path
interpolate

Interpolate
gridDistance

Distance on a grid
intersect

Intersect
getValuesFocal

Get focal raster cell values
isLonLat

Is this longitude/latitude data?
localFun

Local functions
mask

Mask values in a Raster object
metadata

Metadata
mosaic

Merge Raster* objects using a function for overlapping areas
ncell

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

Raster to contour lines conversion
layerStats

Correlation and (weighted) covariance
modal

modal value
predict

Spatial model predictions
rasterToPoints

Raster to points conversion
Programming

Helper functions for programming
layerize

Layerize
plotRGB

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

Distance between points
movingFun

Moving functions
rasterToPolygons

Raster to polygons conversion
persp

Perspective plot
match

Value matching for Raster* objects
properties

Raster file properties
quantile

Raster quantiles
merge

Merge Raster* objects
plot

Plot a Raster* object
rasterFromCells

Subset a raster by cell numbers
sampleRegular

Regular sample
resample

Resample a Raster object
resolution

Resolution
rasterFromXYZ

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

Stratified random sample
readAll

Read values from disk
rasterize

Rasterize points, lines, or polygons
scale

Scale values
projectRaster

Project a Raster object
reclassify

Reclassify
spplot

Use spplot to plot a Raster* or other object
sp

Create SpatialLines* or SpatialPolygons*
raster

Create a RasterLayer object
stackSave

Save or open a RasterStack file
Options

Global options for the raster package
stack

Create a RasterStack object
raster-package

Overview of the functions in the raster package
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
rasterTmpFile

Temporary files
transpose

Transpose
rectify

rectify a Raster object
rowSums

rowSums and colSums for Raster objects
rowFromCell

Row or column number from a cell number
projection

Get or set a coordinate reference system (projection)
setValues

Set values of a Raster object
trim

Trim
shapefile

Read or write a shapefile
z-values

Get or set z-values
setMinMax

Compute min and max values
replacement

Replace cell values or layers of a Raster* object
sampleRandom

Random sample
setExtent

Set the extent of a RasterLayer
text

Add labels to a map
zoom

Zoom in on a map
rotate

Rotate
SampleInt

Sample integer values
unique

Unique values
terrain

Terrain characteristics
zonal

Zonal statistics
weighted.mean

Weighted mean of rasters
union

Union Extent or SpatialPolygons* objects
subset

Subset layers in a Raster* object
which

Which cells are TRUE?
shift

Shift
substitute

Substitute values in a Raster* object
Slope and aspect

Slope and aspect
stretch

Stretch
stackSelect

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

Do the raster cells have a rotation?
update

Update raster cells of files (on disk)
writeValues

Write values to a file
xyFromCell

Coordinates from a row, column or cell number
unstack

Unstack
round

Integer values
Extent math

round Extent coordinates
zApply

z (time) apply
writeRaster

Write raster data to a file
scalebar

scalebar
select

Geometric subsetting
validCell

Validity of a cell, column or row number
symdif

Symetrical difference
validNames

Create valid names
Summary

Summary
which.min

Where is the min or max value?
writeFormats

File types for writing
Logic-methods

Logical operators and functions