PlotMC.season: A plot function for time series seasons

Description Usage Arguments Value Author(s) Examples

Description

This is an internal function invoked by MC.analysis function to generate a season plot of the time series under analysis. A season means a time series with length greater to one month e.g. montly, yearly, decadal time series.

Usage

1
PlotMC.season(summ1, namePlot, ylab, qUpper)

Arguments

summ1

A data.frame with n observations of m variables as is provided by the output of function MC.summary.agg for the variable to be plotted, which the summary was computed.

namePlot

A character string defining the name of the plot. The file created with the plot has this name.

ylab

A character string to define the label of the axes y for the variable to plot.

qUpper

A character string that defines the upper percentile to plot the confidence band of results, several options are possible "q999" the 99.9th percentile, "q995" the 99.5th percentile, "q99" the 99th percentile, "q95" the 95th percentile, "q50" the 50th percentile. The lower boundary of the confidence band (showed in gray in the output plots) is the 5th percentile in all cases.

Value

The function creates the plot in the current working directory. The format of the plot is pdf.

Author(s)

J.A. Torres-Matallana

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(stUPscales)
library(EmiStatR)

data("P1")
P1 <- P1[1:550,]
new_data <- matrix(data = NA, nrow = nrow(P1), ncol = 55)
for(i in 1:55){
  new_data[,i] <- matrix(data = rnorm(nrow(P1), 22, 11), 
                         nrow = nrow(P1), ncol = 1)
}
new_data <- t(new_data)

new_summary <- MC.summary(p1 = P1, data = new_data)
head(new_summary)
dim(new_summary)

new_summary$month <- strftime(new_summary[,"time"], format = "%Y-%m")

PlotMC.season(summ1 = new_summary, namePlot = "ExamplePlot", 
              ylab = "Variable 1 [units]", qUpper = "q95")

stUPscales documentation built on May 6, 2019, 1:08 a.m.