Learn R Programming

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

raster (version 1.7-23)

Geographic analysis and modeling with raster data

Description

Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package implements basic and high-level functions, as well as map algebra. Processing of very large files is supported.

Copy Link

Version

Install

install.packages('raster')

Monthly Downloads

153,616

Version

1.7-23

License

GPL (>= 3)

Maintainer

Robert Hijmans

Last Published

January 5th, 2011

Functions in raster (1.7-23)

draw

Draw a line or polygon
Compare-methods

Compare Raster* objects
cut

Convert values to classes
reclass

Reclassify
datasource

Are values in memory and/or on disk?
click

Click on a map
density

Density plot
Gain and offset

Gain and offset of values on file
brick

Create a RasterBrick object
drawExtent

Draw extet
expand

Expand
filename

Filename
intersectExtent

Extent intersection
getValues

Get raster cell values
SampleInt

Sample integer values
zoom

Zoom in on a plot
merge

Merge RasterLayers
aggregate

Aggregate cells
round

Integer values
shift

Shift
cellFrom

Get cell, row, or column number
writeValues

Write values to a file
Arith-methods

Arithmic with Raster* objects
contour

Contour plot
Programming

Helper functions for programming
flip

Flip
calc

Calculate
pointDistance

Distance between points
getData

Get geographic data
KML

Write a KML file
gridDistance

Grid distance
rasterToContour

Raster to contour lines conversion
raster

Create a RasterLayer object
interpolate

Interpolate
xyFromCell

Coordinates from a row, column or cell number
clearValues

Clear values
Extent-class

Class "Extent"
Logic-methods

Logical operators and functions
as.logical

Change values to logical
mosaic

Merge RasterLayers using a function for overlapping areas
Math-methods

Mathematical functions
extent

Extent
extremeValues

Minimum and maximum values
rotate

Rotate
getValuesBlock

Get a block of raster cell values
hdr

Header files
focal

Focal
boxplot

Box plot of Raster objects
addLayer

Add or drop a layer
persp

Perspective plot
pairs

Pairs plot (matrix of scatterplots)
initialize

Intitialize
stats

Miscellaneous statistical functions
properties

Raster file properties
rasterizeObsolete

Obsolete
rasterize

Rasterize points, lines, or polygons
origin

Origin
image

Image
Summary

Summary
distanceFromPoints

Distance from points
alignExtent

Align an extent (object of class Extent)
Raster-class

Raster* classes
Options

Global options for the raster package
extract

Extract values from Raster objects
Summary-methods

Summary methods
crop

Crop
area

Size of cells
factors

Factors
zonal

Zonal statistics
plot

Plot a Raster* object
indexing

Extract or replace cell values of a Raster object
adjacency

Adjacency
setMinMax

Compute min and max values
resolution

Resolution
Extent coordinates

Coordinates of the Extent of a Raster object
cellValues

Obsolete functions
bands

Number of bands
readAll

Read values from disk
blockSize

Block size for writing files
projection

Get or set a projection
dataType

Data type
update

Update raster cells of files (on disk)
which

Which cells are TRUE?
rasterFromCells

Subset a raster by cell numbers
sampleRegular

Regular sample
raster-package

An overview of the functions in this package
Cluster

Use a multi-core (snow) cluster
hist

Histogram
sampleRandom

Random sample
setExtent

Set the extent of a RasteLayer
distance

Distance
cellStats

Cell statistics
saverasterstack

Save or open a RasterStack file
writeRaster

Write raster data to a file
edge

Edge detection
rasterToPoints

Raster to points conversion
rasterFromXYZ

Create a RasterLayer from x, y, z values
ncell

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

Trim
disaggregate

Disaggregate
nlayers

Number of layers
dim

Dimensions of a Raster* object
direction

Direction
transpose

transpose
rowFromCell

Row or column number from a cell number
resample

Resample
unionExtent

Extent union
focalFilter

Focal filter
head

Show the head or tail of the values of a RasterLaayer
polygonFromExtent

Polygon from Extent
overlay

Overlay Raster objects
unstack

Unstack
isLonLat

Is this longitude/latitude data?
quantile

Raster quantiles
rasterToPolygons

Raster to polygons conversion
substitute

Substitute values in a RasterLayer
NAvalue

Set the NA value of a RasterLayer
filledContour

Filled contour plot
compare

Compare
mask

Mask values in a Raster object
plot3D

Interactive 3D plot of a RasterLayer
rasterTmpFile

Temporary files
subset

Subset layers in a Raster* object
stackApply

Apply a function on subsets of a RasterStack or RasterBrick
unique

Unique values
freq

Frequency table
count

Count
plotRGB

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

Spatial model predictions
projectRaster

Project a Raster object
validCell

Validity of a cell, column or row number
stack

Create a RasterStack object
writeFormats

File types for writing
setValues

Set values of a Raster object
cover

Replace NA values with values of other layers
extension

Filename extensions
inifile

Read a .ini file
obsolete

Obsolete functions
as.matrix

Get a matrix with raster cell values
cellsFromExtent

Cells from Extent
clump

Detect clumps
crosstab

Cross-tabulate
nudgeExtent

Round extent coordinates