# NOT RUN {
df.ref <- with(wtg, data.frame(time = time, turb.id = 1, wind.dir = D, power = y,
air.dens = rho))
df.ctrb <- with(wtg, data.frame(time = time, turb.id = 2, wind.spd = V, power = y))
df.ctrn <- df.ctrb
df.ctrn$turb.id <- 3
# For Full Sector Analysis
data <- arrange.data(df.ref, df.ctrb, df.ctrn, p1.beg = '2014-10-24', p1.end = '2014-10-27',
p2.beg = '2014-10-27', p2.end = '2014-10-30')
# For Free Sector Analysis
free.sec <- list(c(310, 50), c(150, 260))
data <- arrange.data(df.ref, df.ctrb, df.ctrn, p1.beg = '2014-10-24', p1.end = '2014-10-27',
p2.beg = '2014-10-27', p2.end = '2014-10-30', free.sec = free.sec)
length(data$train) #This equals to k.
length(data$test) #This equals to k.
head(data$per1) #This shows the beginning of the period 1 dataset.
head(data$per2) #This shows the beginning of the period 2 dataset.
# }
Run the code above in your browser using DataLab