plotall: Visualise climate window data

Description Usage Arguments Value Author(s) Examples

View source: R/plotall.R

Description

Creates a panel of plots to help visualise climate window data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotall(
  dataset,
  datasetrand = NULL,
  bestmodel = NULL,
  bestmodeldata = NULL,
  cw1 = 0.95,
  cw2 = 0.5,
  cw3 = 0.25,
  title = NULL,
  arrow = FALSE
)

Arguments

dataset

A dataframe containing information on all fitted climate windows. Output from slidingwin.

datasetrand

A dataframe containing information on all fitted climate windows using randomised data. Output from randwin.

bestmodel

A model object. The strongest climate window model. Returned from singlewin or slidingwin.

bestmodeldata

A dataframe containing the biological and climate data used to fit the strongest climate window model. Output from singlewin or slidingwin.

cw1, cw2, cw3

Cumulative weight levels used to visualise model weight distribution. See plotweights for more detail.

title

Title of the plot panel.

arrow

TRUE or FALSE. Add arrows to plots to pinpoint best window.

Value

Will return a panel of 6-8 plots:

Author(s)

Liam D. Bailey and Martijn van de Pol

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Visualise a fixed climate window generated for dataframes Mass and MassClimate

data(MassOutput)
data(Mass)
data(MassClimate)

single <- singlewin(xvar = list(Temp = MassClimate$Temp), 
                   cdate = MassClimate$Date, bdate = Mass$Date, 
                   baseline = lm(Mass ~ 1, data = Mass), 
                   range = c(72, 15), 
                   stat = "mean", func = "lin", 
                   type = "absolute", refday = c(20, 5), 
                   cmissing = FALSE, cinterval = "day")
           
plotall(dataset = MassOutput, bestmodel = single$BestModel, 
       bestmodeldata = single$BestModelData,
       cw1 = 0.95, cw2 = 0.5, cw3 = 0.25, title = "Mass")
        
         

climwin documentation built on July 1, 2020, 7:04 p.m.