'update'
[talweg.git] / pkg / R / sample_dataset.R
CommitLineData
3a38473a
BA
1#' Sample dataset to run the algorithm
2#'
3#' Original data from AirNormand was removed, and replaced with the following:
4#' \itemize{
5#' \item{daily_exogenous.csv}{a CSV file containing dates in the first column, and then n columns for measurements, and finally n columns for predictions (same day)}
6#' \item{intraday_measures.csv}{a CSV file with two columns: the first with datetimes, and the second with measurements}
7#' }
8#' -----\cr
9#' Here is the code that generated these files: (not any physical sense)\cr
10#' #dts = timestamps from 1970-01-01 01:00 to 1972-01-01 00:00\cr
11#' dts = seq(0,17519*3600,3600)\cr
12#' intraday = data.frame(\cr
13#' Time=as.POSIXct(dts,tz="GMT",origin="1970-01-01 01:00"),\cr
14#' Measure=rgamma(length(dts),10,.7) )\cr
15#' dates = seq(as.Date("1970-01-01"), as.Date("1972-01-01"), "day")\cr
16#' m1 = cos(seq_along(dates))\cr
17#' m2 = log(seq_along(dates)+1)\cr
18#' daily = data.frame(\cr
19#' Date=dates,\cr
20#' m1=m1,\cr
21#' m2=m2,\cr
22#' m1_pred=m1+rnorm(length(m1),sd=.1),\cr
23#' m2_pred=m2+rnorm(length(m2),sd=.1) )\cr
24#' write.csv(intraday, file="intraday_measures.csv", row.names=F)\cr
25#' write.csv(daily, file="daily_exogenous.csv", row.names=F)
26#'
27#' @name sample
28#' @docType data
29#' @usage data(talweg::sample)
30#' @format Two dataframes: intraday with 17519 rows and 2 columns (Time,Measure), hourly;
31#' and daily with 731 rows, 5 columns (Date,m1,m2,m1_pred,m2_pred)
32NULL