raster: Geographic Data Analysis and Modeling
地理データの解析やモデリング
- CRAN: http://cran.r-project.org/web/packages/raster/index.html
- Vignettes: https://cran.r-project.org/web/packages/raster/vignettes/Raster.pdf, https://cran.r-project.org/web/packages/raster/vignettes/functions.pdf, https://cran.r-project.org/web/packages/raster/vignettes/rasterfile.pdf
> library(raster)
Error: package or namespace load failed for 'raster'
バージョン: 2.5.8
関数名 | 概略 |
---|---|
Arith-methods |
Arithmetic with Raster* objects |
Compare-methods |
Compare Raster* objects |
Extent-class |
Class "Extent" |
Geary |
Spatial autocorrelation |
KML |
Write a KML or KMZ file |
Logic-methods |
Logical operators and functions |
Math-methods |
Mathematical functions |
NAvalue |
Set the NA value of a RasterLayer |
RGB |
Create a Red-Green-Blue Raster object |
Raster-class |
Raster* classes |
Summary-methods |
Summary methods |
Which |
Which cells are TRUE? |
[<-,RasterLayer,RasterLayer,missing-method |
Replace cell values or layers of a Raster* object |
[[,Raster,ANY,ANY-method |
Indexing to extract values of a Raster* object |
addLayer |
Add or drop a layer |
adjacent |
Adjacent cells |
aggregate |
Aggregate raster cells or SpatialPolygons/Lines |
alignExtent |
Align an extent (object of class Extent) |
animate |
Animate layers of a Raster* object |
approxNA |
Estimate values for cell values that are 'NA' by interpolating between layers |
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 |
as.logical,Raster-method |
Change values to logical |
as.matrix |
Get a matrix with raster cell values |
as.raster |
Coerce to a 'raster' object |
atan2 |
Two argument arc-tangent |
bandnr |
Number of bands |
barplot |
Bar plot of a RasterLayer |
beginCluster |
Use a multi-core cluster |
bind |
Bind Spatial* objects |
blockSize |
Block size for writing files |
boundaries |
boundaries (edges) detection |
boxplot |
Box plot of Raster objects |
brick |
Create a RasterBrick object |
buffer |
buffer |
calc |
Calculate |
cellFromRowCol |
Get cell, row, or column number |
cellStats |
Statistics across cells |
cellsFromExtent |
Cells from Extent |
clamp |
Clamp values |
clearValues |
Clear values |
click |
Query by clicking on a map |
clump |
Detect clumps |
colortable |
colortable |
compareCRS |
Partially compare two CRS objects |
compareRaster |
Compare Raster objects |
contour |
Contour plot |
corLocal |
Local correlation coefficient |
cover |
Replace NA values with values of other layers |
crop |
Crop |
crosstab |
Cross-tabulate |
cut |
Convert values to classes |
cv |
Coefficient of variation |
dataSize |
Raster file properties |
dataType |
Data type |
density |
Density plot |
dim |
Dimensions of a Raster* object |
direction |
Direction |
disaggregate |
Disaggregate |
distance |
Distance |
distanceFromPoints |
Distance from points |
drawExtent |
Create an Extent object by drawing on a map |
drawPoly |
Draw a line or polygon |
erase |
Erase parts of a Spatial* object |
extend |
Extend |
extension |
Filename extensions |
extent |
Extent |
extract |
Extract values from Raster objects |
filename |
Filename |
filledContour |
Filled contour plot |
flip |
Flip |
floor,Extent-method |
round Extent coordinates |
flowPath |
Flow path |
focal |
Focal values |
focalWeight |
Focal weights matrix |
freq |
Frequency table |
fromDisk |
Are values in memory and/or on disk? |
gain |
Gain and offset of values on file |
geom |
Get the coordinates of a vector type Spatial* object |
getData |
Get geographic data |
getValues |
Get raster cell values |
getValuesBlock |
Get a block of raster cell values |
getValuesFocal |
Get focal raster cell values |
getZ |
Get or set z-values |
gridDistance |
Distance on a grid |
hdr |
Header files |
head |
Show the head or tail of a Raster* object |
hillShade |
Hill shading |
hist |
Histogram |
image |
Image |
init |
Intitialize a Raster object with values |
interpolate |
Interpolate |
intersect |
Intersect |
is.factor |
Factors |
isLonLat |
Is this longitude/latitude data? |
layerStats |
Correlation and (weighted) covariance |
layerize |
Layerize |
localFun |
Local functions |
mask |
Mask values in a Raster object |
match |
Value matching for Raster* objects |
merge |
Merge Raster* objects |
metadata |
Metadata |
minValue |
Minimum and maximum values |
modal |
modal value |
mosaic |
Merge Raster* objects using a function for overlapping areas |
movingFun |
Moving functions |
names |
Names of raster layers |
ncell |
Number or rows, columns, and cells of a Raster* object |
nlayers |
Number of layers |
origin |
Origin |
overlay |
Overlay Raster objects |
pairs |
Pairs plot (matrix of scatterplots) |
persp |
Perspective plot |
plot |
Plot a Raster* object |
plotRGB |
Red-Green-Blue plot of a multi-layered Raster object |
pointDistance |
Distance between points |
predict |
Spatial model predictions |
projectRaster |
Project a Raster object |
projection |
Get or set a coordinate reference system (projection) |
quantile |
Raster quantiles |
raster |
Create a RasterLayer object |
raster-package |
Overview of the functions in the raster package |
rasterFromCells |
Subset a raster by cell numbers |
rasterFromXYZ |
Create a Raster* object from x, y, z values |
rasterOptions |
Global options for the raster package |
rasterTmpFile |
Temporary files |
rasterToContour |
Raster to contour lines conversion |
rasterToPoints |
Raster to points conversion |
rasterToPolygons |
Raster to polygons conversion |
rasterize |
Rasterize points, lines, or polygons |
readAll |
Read values from disk |
readIniFile |
Read a .ini file |
readStart |
Helper functions for programming |
reclassify |
Reclassify |
rectify |
rectify a Raster object |
resample |
Resample a Raster object |
rotate |
Rotate |
rotated |
Do the raster cells have a rotation? |
round,RasterLayer-method |
Integer values |
rowFromCell |
Row or column number from a cell number |
rowSums |
rowSum and colSum for Raster objects |
sampleInt |
Sample integer values |
sampleRandom |
Random sample |
sampleRegular |
Regular sample |
sampleStratified |
Stratified random sample |
scale |
Scale values |
scalebar |
scalebar |
select |
Geometric subsetting |
setExtent |
Set the extent of a RasterLayer |
setMinMax |
Compute min and max values |
setValues |
Set values of a Raster object |
shapefile |
Read or write a shapefile |
shift |
Shift |
slopeAspect |
Slope and aspect |
spLines |
Create SpatialLines or SpatialPolygons |
spplot |
Use spplot to plot a Raster* object |
stack |
Create a RasterStack object |
stackApply |
Apply a function on subsets of a RasterStack or RasterBrick |
stackSave |
Save or open a RasterStack file |
stackSelect |
Select cell values from a multi-layer Raster* object |
stretch |
Stretch |
subs |
Substitute values in a Raster* object |
subset |
Subset layers in a Raster* object |
summary,RasterLayer-method |
Summary |
symdif |
Symetrical difference |
t |
Transpose |
terrain |
Terrain characteristics |
text |
Add labels to a map |
trim |
Trim |
union |
Union Extent or SpatialPolygons* objects |
unique |
Unique values |
unstack |
Unstack |
update |
Update raster cells of files (on disk) |
validCell |
Validity of a cell, column or row number |
validNames |
Create valid names |
weighted.mean |
Weighted mean of rasters |
which.min |
Where is the min or max value? |
writeFormats |
File types for writing |
writeRaster |
Write raster data to a file |
writeValues |
Write values to a file |
xmin |
Coordinates of the Extent of a Raster object |
xres |
Resolution |
xyFromCell |
Coordinates from a row, column or cell number |
zApply |
z (time) apply |
zonal |
Zonal statistics |
zoom |
Zoom in on a map |
autocorrelation / Geary / Moran / MoralLocal / GearyLocal
空間的自己相関
Arguments
- x... ラスターレイヤー
- w
> r <- raster(nrows = 10, ncols = 10)
Error in eval(expr, envir, enclos): could not find function "raster"
> r[] <- 1:ncell(r)
Error in eval(expr, envir, enclos): could not find function "ncell"
> Moran(r)
Error in eval(expr, envir, enclos): could not find function "Moran"
> Geary(r)
Error in eval(expr, envir, enclos): could not find function "Geary"
> MoranLocal(r)
Error in eval(expr, envir, enclos): could not find function "MoranLocal"
crop
切り抜き
> r <- raster(nrow = 45, ncol = 90)
> r[] <- 1:ncell(r)
> e <- extent(-160, 10, 30, 60)
> rc <- crop(r, e)
ncell
> r <- raster()
Error in eval(expr, envir, enclos): could not find function "raster"
> ncell(r)
Error in eval(expr, envir, enclos): could not find function "ncell"
> ncol(r)
Error in ncol(r): object 'r' not found
> nrow(r)
Error in nrow(r): object 'r' not found
> dim(r)
Error in eval(expr, envir, enclos): object 'r' not found
raster
ラスターレイヤーオブジェクトの作成
Arguments
- x
- band
- ...
- layer
- values
- nrows
- ncols
- xmn
- xmx
- ymn
- ymx
- ext
- crs
- resolution
- vals
- origin
- template
> raster(nrows = 10, ncols = 10)
Error in eval(expr, envir, enclos): could not find function "raster"