Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/varianceSummary.R
Illustrates the results of the variance analysis performed with
function varianceAnalysis
based on a spatial subsetting of the
study area.
1 2 3 |
... |
A single or multiple objects returned by function |
component |
Integer indicating the number of the component analyzed in function
|
drawBoxplot |
Logical. If FALSE, points of the spatial mean are plotted. |
regions |
Either a |
addWorld |
Logical that indicates if the lines of the world should be drawn on the map. |
outline |
Same as in |
parMap |
List of graphical parameters affecting the output map. |
parGraph |
List of graphical parameters affecting the output boxplot/pointplot. |
When parameter 'regions' is an integer (not a SpatialPolygons
object) a grid
of polygons is created using function union
from package raster.
Boxes/points of the total standard deviation in each region is are also plotted (over 100) with colored background.
The output boxplot shows the spatial spread of the results in each region. On the contrary, if paramter
drawBoxplot = FALSE
, the output graph only shows points of the spatial mean for each region.
However, might be useful when multiple results are compared, as the resulting graph has a cleaner
appearance.
This function returns a map of the spatial subset performed and a graph of the variance results for each spatial subset. Additionally, returns a matrix (or list of matrixes) with the summary of the results.
M. Iturbide
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Load climate data
destfile <- tempfile()
data.url <- "https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda"
download.file(data.url, destfile)
load(destfile, verbose = TRUE)
## Fitted models
data(mods)
?mods
## Model prediction and analysis of the variability in projections
newClim <- lapply(1:4, function(x){
crop(biostack$future[[x]], extent(-10, 5, 35, 60))
})
prdRS.fut <- mopaPredict(models = mods, newClim = newClim)
result <- varianceAnalysis(prdRS.fut, "PA", "newClim")
## Summary of the results
varianceSummary(result, component = 2, regions = c(4, 6))
## Use a SpatialPolygons object for spatial subsetting
destfile <- tempfile()
data.url <- "https://github.com/SantanderMetGroup/visualizeR/raw/devel/data/PRUDENCEregions.rda"
download.file(data.url, destfile)
load(destfile, verbose = TRUE)
varianceSummary("mars" = result, component = 2, regions = PRUDENCEregions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.