Learn R Programming

RtsEva (version 1.1.0)

tsEvaPlotSeriesTrendStdDevFromAnalyisObj: tsEvaPlotSeriesTrendStdDevFromAnalyisObj

Description

tsEvaPlotTrendStdDevFromAnalysisObjis a function that plots a time series along with its trend and standard deviation.

Usage

tsEvaPlotSeriesTrendStdDevFromAnalyisObj(
  nonStationaryEvaParams,
  stationaryTransformData,
  trans,
  ...
)

Value

A ggplot object representing the plot.

Arguments

nonStationaryEvaParams

The non-stationary evaluation parameters.

stationaryTransformData

The stationary transformed data.

trans

The transformation used to fit the EVD, either "ori" (original) or "rev" (reverse). "inv" and "lninv" are also available

...

Additional arguments to customize the plot (optional).

Examples

Run this code
# Example usage of TsEvaNs function
timeAndSeries <- ArdecheStMartin
#go from six-hourly values to daily max
timeAndSeries <- max_daily_value(timeAndSeries)
#keep only the 30 last years
yrs <- as.integer(format(timeAndSeries$date, "%Y"))
tokeep <- which(yrs>=1990)
timeAndSeries <- timeAndSeries[tokeep,]
timeWindow <- 10*365 # 10 years
TSEVA_data <- TsEvaNs(timeAndSeries, timeWindow,
transfType = 'trendPeaks',tail = 'high')
nonStationaryEvaParams <- TSEVA_data[[1]]
stationaryTransformData <- TSEVA_data[[2]]
trans='ori'
result = tsEvaPlotSeriesTrendStdDevFromAnalyisObj(nonStationaryEvaParams,
stationaryTransformData, trans)
result

Run the code above in your browser using DataLab