Learn R Programming

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

raster (version 2.5-8)

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

140,904

Version

2.5-8

License

GPL (>= 3)

Maintainer

Last Published

June 2nd, 2016

Functions in raster (2.5-8)

addLayer

Add or drop a layer
aggregate

Aggregate raster cells or SpatialPolygons/Lines
animate

Animate layers of a Raster* object
alignExtent

Align an extent (object of class Extent)
adjacent

Adjacent cells
area

Size of cells
as.data.frame

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

Arithmetic with Raster* objects
as.list

Create a list of RasterLayer objects
approxNA

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

Change cell values to logical or integer values
barplot

Bar plot of a RasterLayer
blockSize

Block size for writing files
bind

Bind Spatial* objects
boundaries

boundaries (edges) detection
as.raster

Coerce to a 'raster' object
autocorrelation

Spatial autocorrelation
bands

Number of bands
as.matrix

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

Two argument arc-tangent
brick

Create a RasterBrick object
buffer

buffer
clearValues

Clear values
cellFrom

Get cell, row, or column number
clamp

Clamp values
calc

Calculate
click

Query by clicking on a map
cellsFromExtent

Cells from Extent
boxplot

Box plot of Raster objects
cellStats

Statistics across cells
contour

Contour plot
corLocal

Local correlation coefficient
Extreme coordinates

Coordinates of the Extent of a Raster object
compareCRS

Partially compare two CRS objects
colortable

colortable
compareRaster

Compare Raster objects
Compare-methods

Compare Raster* objects
clump

Detect clumps
cover

Replace NA values with values of other layers
cluster

Use a multi-core cluster
datasource

Are values in memory and/or on disk?
cut

Convert values to classes
dataType

Data type
draw

Draw a line or polygon
drawExtent

Create an Extent object by drawing on a map
cv

Coefficient of variation
focalWeight

Focal weights matrix
freq

Frequency table
Extract by index

Indexing to extract values of a Raster* object
extremeValues

Minimum and maximum values
crop

Crop
Extent-class

Class "Extent"
crosstab

Cross-tabulate
extension

Filename extensions
factors

Factors
filename

Filename
hist

Histogram
image

Image
metadata

Metadata
modal

modal value
head

Show the head or tail of a Raster* object
KML

Write a KML or KMZ file
hillShade

Hill shading
mask

Mask values in a Raster object
isLonLat

Is this longitude/latitude data?
match

Value matching for Raster* objects
ncell

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

Number of layers
density

Density plot
dim

Dimensions of a Raster* object
extent

Extent
geom

Get the coordinates of a vector type Spatial* object
extract

Extract values from Raster objects
interpolate

Interpolate
Gain and offset

Gain and offset of values on file
plot

Plot a Raster* object
intersect

Intersect
plotRGB

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

Get a block of raster cell values
getValuesFocal

Get focal raster cell values
layerize

Layerize
layerStats

Correlation and (weighted) covariance
movingFun

Moving functions
mosaic

Merge Raster* objects using a function for overlapping areas
persp

Perspective plot
pairs

Pairs plot (matrix of scatterplots)
Programming

Helper functions for programming
pointDistance

Distance between points
predict

Spatial model predictions
rasterToPoints

Raster to points conversion
rasterToPolygons

Raster to polygons conversion
scale

Scale values
transpose

Transpose
scalebar

scalebar
trim

Trim
weighted.mean

Weighted mean of rasters
which

Which cells are TRUE?
writeRaster

Write raster data to a file
writeValues

Write values to a file
readAll

Read values from disk
reclassify

Reclassify
sampleRandom

Random sample
RGB

Create a Red-Green-Blue Raster object
sampleRegular

Regular sample
rotate

Rotate
setMinMax

Compute min and max values
erase

Erase parts of a Spatial* object
extend

Extend
flowPath

Flow path
focal

Focal values
getData

Get geographic data
initialize

Intitialize a Raster object with values
getValues

Get raster cell values
Math-methods

Mathematical functions
inifile

Read a .ini file
merge

Merge Raster* objects
origin

Origin
overlay

Overlay Raster objects
raster-package

Overview of the functions in the raster package
raster

Create a RasterLayer object
rasterize

Rasterize points, lines, or polygons
rectify

rectify a Raster object
Options

Global options for the raster package
replacement

Replace cell values or layers of a Raster* object
rowSums

rowSums and colSums for Raster objects
SampleInt

Sample integer values
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
stackSelect

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

Summary
symdif

Symetrical difference
unstack

Unstack
zApply

z (time) apply
update

Update raster cells of files (on disk)
direction

Direction
xyFromCell

Coordinates from a row, column or cell number
disaggregate

Disaggregate
distance

Distance
distanceFromPoints

Distance from points
filledContour

Filled contour plot
flip

Flip
projection

Get or set a coordinate reference system (projection)
sampleStratified

Stratified random sample
resample

Resample a Raster object
stackSave

Save or open a RasterStack file
resolution

Resolution
Slope and aspect

Slope and aspect
substitute

Substitute values in a Raster* object
sp

Create SpatialLines* or SpatialPolygons*
gridDistance

Distance on a grid
hdr

Header files
localFun

Local functions
Logic-methods

Logical operators and functions
rasterTmpFile

Temporary files
Raster-class

Raster* classes
quantile

Raster quantiles
rasterToContour

Raster to contour lines conversion
Extent math

round Extent coordinates
rowFromCell

Row or column number from a cell number
Summary-methods

Summary methods
validCell

Validity of a cell, column or row number
validNames

Create valid names
zoom

Zoom in on a map
zonal

Zonal statistics
terrain

Terrain characteristics
text

Add labels to a map
setValues

Set values of a Raster object
union

Union Extent or SpatialPolygons* objects
unique

Unique values
select

Geometric subsetting
setExtent

Set the extent of a RasterLayer
shapefile

Read or write a shapefile
z-values

Get or set z-values
shift

Shift
names

Names of raster layers
NAvalue

Set the NA value of a RasterLayer
projectRaster

Project a Raster object
rasterFromCells

Subset a raster by cell numbers
properties

Raster file properties
rasterFromXYZ

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

Do the raster cells have a rotation?
round

Integer values
stack

Create a RasterStack object
spplot

Use spplot to plot a Raster* object
subset

Subset layers in a Raster* object
stretch

Stretch
which.min

Where is the min or max value?
writeFormats

File types for writing