'update'
[talweg.git] / data / scripts / build_testdata.R
CommitLineData
6710081f
BA
1#Lundi à dimanche, 182 jours
2dates = seq(as.Date("2007-01-01"),as.Date("2007-07-01"),"days")
da7f46b8
BA
3times = strftime( seq(
4 from=ISOdatetime(2007,1,1,1,0,0,tz="GMT"),
5 to=ISOdatetime(2007,7,2,0,0,0,tz="GMT"),
44a9990b 6 by="hour"), tz="GMT" )
6710081f 7
99f83c9a 8# Only one covariable (no need for more; random, to invert cov(M))
da7f46b8 9L = length(dates) #182
99f83c9a 10exo_df = data.frame( "date"=dates, "var"=rnorm(L,1), "var_pred"=rnorm(L,1) )
613a986f 11# Series are 1,1,...,1 2,2,...,2 ... 7,7,...,7 1,1,...,1 ...etc
da7f46b8
BA
12# First serie on monday 2007-01-01, there are exactly 26 weeks
13ts_df = data.frame( "time"=times, "value"=rep(seq_len(7), each=24, times=26) )
613a986f 14
da7f46b8
BA
15write.csv(ts_df, file="ts_test.csv", row.names=FALSE)
16write.csv(exo_df, file="exo_test.csv", row.names=FALSE)