plotall {climwin}R Documentation

Visualise climate window data

Description

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

Usage

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


# 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")
        
         

[Package climwin version 1.2.3 Index]