Learn R Programming

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

raster (version 2.8-19)

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.8-19

License

GPL (>= 3)

Maintainer

Last Published

January 30th, 2019

Functions in raster (2.8-19)

Logic-methods

Logical operators and functions
approxNA

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

Size of cells
as.list

Create a list of RasterLayer objects
as.logical

Change cell values to logical or integer values
Extent-class

Class "Extent"
brick

Create a RasterBrick object
KML

Write a KML or KMZ file
alignExtent

Align an extent (object of class Extent)
animate

Animate layers of a Raster* object
as.matrix

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

buffer
click

Query by clicking on a map
clump

Detect clumps
as.raster

Coerce to a 'raster' object
clamp

Clamp values
clearValues

Clear values
crop

Crop
compareRaster

Compare Raster objects
NAvalue

Set the NA value of a RasterLayer
crosstab

Cross-tabulate
extract

Extract values from Raster objects
compareCRS

Partially compare two CRS objects
Extract by index

Indexing to extract values of a Raster* object
RGB

Create a Red-Green-Blue Raster object
cut

Convert values to classes
Raster-class

Raster* classes
Rcpp-class

Rcpp classes
adjacent

Adjacent cells
flip

Flip
aggregate

Aggregate raster cells or SpatialPolygons/Lines
bands

Number of bands
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
flowPath

Flow path
bind

Bind Spatial* objects
barplot

Bar plot of a RasterLayer
boundaries

boundaries (edges) detection
getValuesFocal

Get focal raster cell values
gridDistance

Distance on a grid
Arith-methods

Arithmetic with Raster* objects
cv

Coefficient of variation
distance

Distance
blockSize

Block size for writing files
Compare-methods

Compare Raster* objects
distanceFromPoints

Distance from points
filename

Filename
names

Names of raster layers
initialize

Intitialize a Raster object with values
interpolate

Interpolate
corLocal

Local correlation coefficient
atan2

Two argument arc-tangent
ncell

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

Raster to contour lines conversion
filledContour

Filled contour plot
cover

Replace NA values with values of other layers
autocorrelation

Spatial autocorrelation
getValues

Get raster cell values
Summary-methods

Summary methods
rasterToPoints

Raster to points conversion
draw

Draw a line or polygon
rotate

Rotate
rotated

Do the raster cells have a rotation?
getValuesBlock

Get a block of raster cell values
addLayer

Add or drop a layer
cellStats

Statistics across cells
inifile

Read a .ini file
movingFun

Moving functions
image

Image
mosaic

Merge Raster* objects using a function for overlapping areas
overlay

Overlay Raster objects
pairs

Pairs plot (matrix of scatterplots)
resample

Resample a Raster object
boxplot

Box plot of Raster objects
contour

Contour plot
Extreme coordinates

Coordinates of the Extent of a Raster object
SampleInt

Sample integer values
scale

Scale values
resolution

Resolution
stackSave

Save or open a RasterStack file
dataType

Data type
stack

Create a RasterStack object
drawExtent

Create an Extent object by drawing on a map
calc

Calculate
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
cellsFromExtent

Cells from extent, and vice versa
sampleRandom

Random sample
intersect

Intersect
datasource

Are values in memory and/or on disk?
extend

Extend
erase

freq

Frequency table
unstack

Unstack
scalebar

scalebar
isLonLat

Is this longitude/latitude data?
Gain and offset

Gain and offset of values on file
update

Update raster cells of files (on disk)
writeRaster

Write raster data to a file
head

Show the head or tail of a Raster* object
hdr

Header files
merge

Merge Raster* objects
match

Value matching for Raster* objects
cluster

Use a multi-core cluster
select

Geometric subsetting
writeValues

Write values to a file
cellFrom

Get cell, row, or column number
validNames

Create valid names
validCell

Validity of a cell, column or row number
zoom

Zoom in on a map
zonal

Zonal statistics
nlayers

Number of layers
predict

Spatial model predictions
Programming

Helper functions for programming
density

Density plot
Options

Global options for the raster package
dim

Dimensions of a Raster* object
rasterTmpFile

Temporary files
origin

Origin
focal

Focal values
plotRGB

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

Focal weights matrix
hillShade

Hill shading
hist

Histogram
layerStats

Correlation and (weighted) covariance
sampleRegular

Regular sample
colortable

colortable
pointDistance

Distance between points
layerize

Layerize
metadata

Metadata
sampleStratified

Stratified random sample
modal

modal value
raster-package

Overview of the functions in the raster package
shift

Shift
raster

Create a RasterLayer object
direction

Direction
projectRaster

Project a Raster object
readAll

Read values from disk
reclassify

Reclassify
disaggregate

Disaggregate
Slope and aspect

Slope and aspect
projection

Get or set a coordinate reference system (projection)
stackSelect

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

Subset a raster by cell numbers
weighted.mean

Weighted mean of rasters
stretch

Stretch
sp

Create SpatialLines* or SpatialPolygons*
extension

Filename extensions
rasterFromXYZ

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

Which cells are TRUE?
spplot

Use spplot to plot a Raster* object
terrain

Terrain characteristics
text

Add labels to a map
rasterToPolygons

Raster to polygons conversion
which.min

Where is the min or max value?
transpose

Transpose
rasterize

Rasterize points, lines, or polygons
rowSums

rowSums and colSums for Raster objects
rowFromCell

Row or column number from a cell number
trim

Trim
xyFromCell

Coordinates from a row, column or cell number
extent

Extent
zApply

z (time) apply
writeFormats

File types for writing
extremeValues

Minimum and maximum values
setExtent

Set the extent of a RasterLayer
setMinMax

Compute min and max values
subset

Subset layers in a Raster* object
factors

Factors
getData

Get geographic data
geom

Get the coordinates of a vector type Spatial* object
mask

Mask values in a Raster object
localFun

Local functions
persp

Perspective plot
substitute

Substitute values in a Raster* object
plot

Plot a Raster* object
z-values

Get or set z-values
properties

Raster file properties
quantile

Raster quantiles
rectify

rectify a Raster object
replacement

Replace cell values or layers of a Raster* object
round

Integer values
Extent math

round Extent coordinates
setValues

Set values of a Raster object
shapefile

Read or write a shapefile
Summary

Summary
symdif

Symetrical difference
union

Union Extent or SpatialPolygons* objects
unique

Unique values
Math-methods

Mathematical functions