Pastebin http://pastebin.com/Nxdfvzqk
The issue comes with our data, we can't ensure there isn't random communication failures or just random errors. This can leave us with values like
Please note: I'm a Software Developer and have never used R before.
-- Edit --
Okay here's a real world example, seems this meter is a good example. You can see the Zeros are building up then a massive value is inserted. "23, 65, 22, 24" being examples of this. This happens when its in comms failure and it holds the data value and continues to add it up on the device.
(Just to say the comms failures are out of my hands nor can I change the software)
However because Zero is a valid value im wanting to remove any massive numbers against the temperatures or Zeros where its clear they are an Error.
The thought of detecting this and averaging the data back isn't a fix for this either, however it was discussed but since this meter data is every 30mins and comms failures can happen for days.
Most systems are using more Energy then this so its perhaps a bad example from a removing Zero's point of view.
Energy: http://pastebin.com/gBa8y5sM Temperatures: http://pastie.org/4371735
(Pastebin seems to have gone down for me after posting such a big file)