title: Real-time anomaly detection
body: <p>I would like to do anomaly detection in R on real-time stream of sensor data. I would like to explore use of either the Twitter <a href="https://github.com/twitter/AnomalyDetection" rel="nofollow noreferrer">anomalyDetection</a>  or <a href="https://github.com/robjhyndman/anomalous" rel="nofollow noreferrer">anomalous</a>. </p>
  
  <p>I am trying to think of the most efficient way to do this, as some online sources suggest R is not suitable for real-time anomaly detection. See <a href="https://anomaly.io/anomaly-detection-twitter-r/" rel="nofollow noreferrer">https://anomaly.io/anomaly-detection-twitter-r</a>. Should I use the <code>stream</code> package to implement my own data stream source? If I do so, is there any "rule-of-thumb" as to how much data I should stream in order to have a sufficient amount of data (perhaps that is what I need to experiment with)? Is there any way of doing the anomaly detection in-database rather than in-application to speed things up?</p>