title: Handling missing values in time series
body: <p>I am dealing with time series data where I need to have continuous time stamps but few of the data timestamp points has been missed while capturing like as below,</p>
  
  <p><code>DF</code></p>
  
  <pre><code>ID Time_Stamp             A           B                 C
  1  02/02/2018 07:45:00   123          567               434     
  2   02/02/2018 07:45:01    
  .....                  ...
  
  5   02/02/2018 07:46:00   
  6   02/02/2018 07:46:10    112          2323            2323
  </code></pre>
  
  <p>As shown in the sample <code>df</code> above, time stamps is continuous till <code>row 5</code> but missed capturing data of <code>10 seconds</code> between <code>5th and 6th row</code>. My data frame is about <code>60000 rows</code> and identifying missing values manually is tedious. 
  Hence I was looking for automating the procedure of handling missing values using R </p>
  
  <p>My result data frame is as below,</p>
  
  <pre><code>ID Time_Stamp                     A           B                 C
  1  02/02/2018 07:45:00           123          567               434     
  2   02/02/2018 07:45:01    
  .....                  ...
  
  5   02/02/2018 07:46:00         mean(A)
  5.1  02/02/2018 07:46:01        mean(A)     mean(b)         mean(c)
  5.2  02/02/2018 07:46:02        mean(A)     mean(b)         mean(c) 
  5.3  02/02/2018 07:46:03        mean(A)     mean(b)         mean(c) 
  5.4  02/02/2018 07:46:04        mean(A)     mean(b)         mean(c)
  5.5  02/02/2018 07:46:05        mean(A)     mean(b)         mean(c)
  5.6  02/02/2018 07:46:06        mean(A)     mean(b)         mean(c)
  5.7  02/02/2018 07:46:07        mean(A)     mean(b)         mean(c)
  5.8  02/02/2018 07:46:08        mean(A)     mean(b)         mean(c)
  5.9  02/02/2018 07:46:09        mean(A)     mean(b)         mean(c)
  6   02/02/2018 07:46:10         112         2323            2323
  </code></pre>
  
  <p>Kindly Help!</p>