#'
#' @description Take in input data frames and/or files containing raw data, and timezones, and
#' output a Data object, roughly corresponding to a list where each cell contains all value
-#' for one day (see \code{?Data}). Current limitation: series (in working_tz) must start at
-#' right after midnight (to keep in sync with exogenous vars)
+#' for one day (see \code{?Data}).
#'
#' @param ts_data Time-series, as a data frame (DB style: 2 columns, first is date/time,
#' second is value) or a CSV file
#' @examples
#' ts_data = read.csv(system.file("extdata","pm10_mesures_H_loc.csv",package="talweg"))
#' exo_data = read.csv(system.file("extdata","meteo_extra_noNAs.csv",package="talweg"))
-#' getData(ts_data, exo_data, input_tz="Europe/Paris", working_tz="Europe/Paris", limit=150)
+#' data = getData(ts_data, exo_data, limit=120)
#' @export
getData = function(ts_data, exo_data, input_tz="GMT", date_format="%d/%m/%Y %H:%M",
working_tz="GMT", predict_at=0, limit=Inf)
break
i = i + 1
}
- if (length(data$getCenteredSerie(1)) < length(data$getCenteredSerie(1)))
+ if (length(data$getCenteredSerie(1)) < length(data$getCenteredSerie(2)))
data$removeFirst()
- if (length(data$getCenteredSerie( data$getSize() )) <
- length(data$getCenteredSerie( data$getSize()-1 )))
+ if (length(data$getCenteredSerie(data$getSize()))
+ < length(data$getCenteredSerie(data$getSize()-1)))
{
data$removeLast()
}
-
data
}