  Radio astronomy is entering a new era with new and future radio observatories
such as the Low Frequency Array and the Square Kilometer Array. We describe in
detail an automated flagging pipeline and evaluate its performance. With only a
fraction of the computational cost of correlation and its use of the previously
introduced SumThreshold method, it is found to be both fast and unrivalled in
its high accuracy. The LOFAR radio environment is analysed with the help of
this pipeline. The high time and spectral resolution of LOFAR have resulted in
an observatory where only a few percent of the data is lost due to RFI.
