PlotMC.season | R Documentation |
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.
PlotMC.season(summ1, namePlot, ylab, qUpper)
summ1 |
A data.frame with n observations of m variables as is provided by the output of function |
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. |
The function creates the plot in the current working directory. The format of the plot is pdf.
J.A. Torres-Matallana
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")
## not run
## creating the plot (uncomment to run)
# PlotMC.season(summ1 = new_summary, namePlot = "ExamplePlot",
# ylab = "Variable 1 [units]", qUpper = "q95")
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.