plotcor: Visualise climate cross correlation or autocorrelation.

Description Usage Arguments Value Author(s) Examples

View source: R/plotcor.R

Description

Create a colour plot to visualise the results of autowin or crosswin. Displays correlation across all desired climate windows.

Usage

1
plotcor(cor.output, type, arrow = FALSE)

Arguments

cor.output

Output of autowin or crosswin

type

Should be either "A" for data generated by autowin or "C" for data generated by crosswin.

arrow

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

Value

Will generate a colour plot to visualise the correlation data.

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
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 
# Visualise climate autocorrelation

data(Mass)
data(MassClimate)

# Fit a single climate window using the datasets Mass and 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")            

# Test the autocorrelation between the climate in this single window and other climate windows.

auto <- autowin(reference = single,
               xvar  = list(Temp = MassClimate$Temp), 
               cdate = MassClimate$Date, bdate = Mass$Date,
               baseline = lm(Mass ~ 1, data = Mass), 
               range = c(365, 0), 
               stat = "mean", func = "lin",
               type = "absolute", refday = c(20, 5),
               cmissing = FALSE, cinterval = "day")
                
# Plot the auto-correlation data

plotcor(auto, type = "A")

## End(Not run)

climwin documentation built on May 19, 2017, 10:22 p.m.

Search within the climwin package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.