ensemble.bioclim.graph: Graphs of bioclimatic ranges of species and climates

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The main graph function makes graphs that show mean, median, minimum, maximum and lower and upper limits for species or climates. The ensemble.bioclim.graph.data function creates input data, using ensemble.bioclim.object internally.

Usage

1
2
3
4
5
6
7
ensemble.bioclim.graph(graph.data = NULL, focal.var = NULL, 
    species.climates.subset = NULL, cols = NULL,
    var.multiply = 1.0, ref.lines = TRUE)

ensemble.bioclim.graph.data(
    x=NULL, p=NULL, fraction = 0.9, 
    species.climate.name="Species001_base", factors = NULL)

Arguments

graph.data

Input data with same variables as created by ensemble.bioclim.graph

focal.var

Bioclimatic variable to be plotted in the graph

species.climates.subset

Character vector with subset of names of species and climates to be plotted in the graph (if not provided, then all species and climates will be plotted).

cols

colours for the different species and climates

var.multiply

multiplier for the values to be plotted; 0.1 should be used if the bioclimatic variable was multiplied by 10 in the raster layers as in WorldClim and AFRICLIM

ref.lines

If TRUE, then horizontal reference lines will be added for the minimum and maximum values of the species or climate plotted on the extreme left in the graph

x

RasterStack object (stack) containing all environmental layers for which statistics should be calculated; see also ensemble.bioclim.

p

presence points used for calibrating the suitability models, typically available in 2-column (lon, lat) dataframe; see also ensemble.bioclim.

fraction

Fraction of range representing the optimal limits, default value of 0.9 as in the original BIOCLIM software; see also ensemble.bioclim.

species.climate.name

Name for the species or climate that will be used as label in the graph.

factors

vector that indicates which variables are factors; these variables will be ignored by the BIOCLIM algorithm; see also ensemble.bioclim.

Details

The function creates a graph that shows mean, median, minimum, maximum and upper and lower limits for a range of species and climates. The graph can be useful in interpreting results of ensemble.bioclim or ensemble.novel.

In the graphs, means are indicated by an asterisk (pch=8 and medians as larger circles (pch=1)).

Value

function ensemble.bioclim.graph.data creates a data frame, function codeensemble.bioclim.graph allows for plotting.

Author(s)

Roeland Kindt (World Agroforestry Centre)

See Also

ensemble.bioclim

Examples

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## Not run: 

# get predictor variables
library(dismo)
predictor.files <- list.files(path=paste(system.file(package="dismo"), '/ex', sep=''),
    pattern='grd', full.names=TRUE)
predictors <- stack(predictor.files)
# subset based on Variance Inflation Factors
predictors <- subset(predictors, subset=c("bio5", "bio6", 
    "bio16", "bio17", "biome"))
predictors
predictors@title <- "base"

# presence points
presence_file <- paste(system.file(package="dismo"), '/ex/bradypus.csv', sep='')
pres <- read.table(presence_file, header=TRUE, sep=',')[,-1]

# climates for north and south (use same process for future climates)
ext2 <- extent(-90, -32, 0, 23)
predictors2 <- crop(predictors, y=ext2)
predictors2 <- stack(predictors2)
predictors2@title <- "north"

ext3 <- extent(-90, -32, -33, 0)
predictors3 <- crop(predictors, y=ext3)
predictors3 <- stack(predictors3)
predictors3@title <- "south"

graph.data1 <- ensemble.bioclim.graph.data(predictors, p=pres, 
    factors="biome", species.climate.name="Bradypus")
graph.data2 <- ensemble.bioclim.graph.data(predictors, p=NULL, 
    factors="biome", species.climate.name="baseline")
graph.data3 <- ensemble.bioclim.graph.data(predictors2, p=NULL, 
    factors="biome", species.climate.name="north")
graph.data4 <- ensemble.bioclim.graph.data(predictors3, p=NULL, 
    factors="biome", species.climate.name="south")
graph.data.all <- rbind(graph.data1, graph.data2, graph.data3, graph.data4)

par.old <- graphics::par(no.readonly=T)
graphics::par(mfrow=c(2, 2))

ensemble.bioclim.graph(graph.data.all, focal.var="bio5", 
    var.multiply=0.1, cols=c("black", rep("blue", 3)))
ensemble.bioclim.graph(graph.data.all, focal.var="bio6", 
    var.multiply=0.1, cols=c("black", rep("blue", 3)))
ensemble.bioclim.graph(graph.data.all, focal.var="bio16", 
    var.multiply=1.0, cols=c("black", rep("blue", 3)))
ensemble.bioclim.graph(graph.data.all, focal.var="bio17", 
    var.multiply=1.0, cols=c("black", rep("blue", 3)))

graphics::par(par.old)


## End(Not run)

Example output

Loading required package: tcltk
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
BiodiversityR 2.11-1: Use command BiodiversityRGUI() to launch the Graphical User Interface; 
to see changes use BiodiversityRGUI(changeLog=TRUE, backward.compatibility.messages=TRUE)

Warning message:
no DISPLAY variable so Tk is not available 
Loading required package: raster
Loading required package: sp
class       : RasterStack 
dimensions  : 192, 186, 35712, 5  (nrow, ncol, ncell, nlayers)
resolution  : 0.5, 0.5  (x, y)
extent      : -125, -32, -56, 40  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
names       : bio5, bio6, bio16, bio17, biome 
min values  :   61, -212,     0,     0,     1 
max values  :  422,  242,  2458,  1496,    14 

BiodiversityR documentation built on April 20, 2021, 5:07 p.m.