How can I split hourly time series?
The Solution that I have found:
y &lt;- ts(data$VALORE,
               frequency = 24,   
               start = 1)        

train &lt;- ts(y[1:12264], frequency=24) #70%
val &lt;- ts(y[12265:17520], frequency=24) #30%