How to predict a time series with seasonal pattern in R 
I have data set (download from here), this data set is occupancy level in an office building within 30 days. There is a seasonal pattern daily as you may easily understand.   I tried diff(t, lag=1440) but it is still non-stationary. What methods should I use to predict this pattern? 
I would like to predict the next few days based on the historical data. I tried different methods in R:
a = read.table("test.csv", sep=","); # read data
b = a[,2]  
t = ts(b, frequency = 1440)  # convert to time series 
plot(t)

d = decompose(t)  
plot(d)
acf(d$random,na.action = na.pass)   # non-stationary
Box.test(d$random)

 A: I took hourly data for 29 days and used AUTOBOX as the software of choice as far as I know  there is no R implementation for the required procedures to form a robust mixed model taking into account multiple frequencies while isolating unusual values . Perhaps you can proxy this sopution in R. It used a multi-frequency ( 7 and 24 ) approach to forming a basic model which was then improved with Interevention Detection and an appropriate ARIMA model. Here is a graph of the Actual and Forecast . The Actual/Fit/Forecast is a little bit busier.  . A plot of the forecasts yields a reasonable view of the next 7 days.  with a partial list of the forecasts . The summary statistics for the model are presented here ..A number of pulse interventions were found. I present here in chronological order some of them. . This could be used by you as a template so that you can see the art of the possible when you have data by minute , by hour and by day and you wish to incorporate fixed effects and auto-regressive memory while effectively dealing with unusual i.e. non-repetitive data points. If these anomalous data points can be explained/understood then one can incorporate event variables to measure there historical impact and to project them into the future thus not simply discarding their effect.
A: Using two variables -


*

*Hour+Minute/60

*Day of Week


Here's the prediction based on first 70% of the data, validated on last 30%, using a GBM model.

It captures the oscilating trend well, but as you can see it fails to capture the daily intensities. If there is any other special significance that can be attached to days (other than weekdays), it can potentially help.
