Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion earlywarnings/R/sensitivity_ews.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ sensitivity_ews <- function(timeseries, indicator = c("ar1", "sd", "acf1", "sk",
100), spanrange = c(5, 100), degree = NULL, incrbandwidth = 20, incrspanrange = 10,
logtransform = FALSE, interpolate = FALSE) {

# timeseries<-ts(timeseries) #strict data-types the input data as tseries object
# Ensure timeseries is of class timeseries
if(!is.ts(timeseries)) timeseries <- ts(timeseries)#strict data-types the input data as tseries object

# for use in later steps

timeseries <- data.matrix(timeseries)
Expand Down