Description Usage Arguments Details Value Author(s) Examples
Function for reclassifying grid files to get a combined statification from more than one grid
1 | rcls.grd(in_grid, no.classes)
|
in_grid |
The grid to be reclassified. |
no.classes |
The number of desired new classes. |
This function reclassifies the input grid into a number of new classes that the user defines. The boundaries of each class are decided automatically by splitting the range of values of the input grid into the user defined number of classes.
Returns a reclassified Raster object
Achilleas Psomas, Niklaus Zimmermann
1 2 3 4 5 6 7 8 9 10 | bio3<- raster(system.file("external/bioclim/current/bio3.grd",package="biomod2"))
bio12<- raster(system.file("external/bioclim/current/bio12.grd",package="biomod2"))
B3.rcl<-rcls.grd(bio3,9)
B12.rcl<-rcls.grd(bio12,9)
B3B12.comb <- B12.rcl+B3.rcl*10
# Plotting a histogram of the classes
hist(B3B12.comb,breaks=100,col=heat.colors(88))
# Plotting the new RasterLayer (9x9 classes)
plot(B3B12.comb,col=rev(rainbow(88)),main="Stratified map")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.