title: R - Zoo - Dealing With Bad Entries
body: <p>I'm trying to read a set of csv datasets into R as zoo time series. I've managed to convert the data into data frames with the index columns as dates and the rest as numeric vectors. I now need to convert these data frame into zoo. Here's the code I'm using:</p>
  
  <pre><code>for(x in 1:length(files)){
      for(n in 1:length(files[[x]]){
          files[[x]][[n]]&lt;-unique(files[[x]][[n]]) #removes duplicate rows
          }
      zfiles[[x]]&lt;-lapply(files[[x]],function(n) read.zoo(n))
      }
  </code></pre>
  
  <p>Upon running it I get this error: <code>Error in read.zoo(n) : index has bad entry at data row 4</code></p>
  
  <p>I've tried randomly converting individual datasets within <code>files</code> and i do not get any error, so I'm assuming there are certain problem sets which cause the issue. Is there any way to remove the bad entries before converting to zoo?</p>
  
  <p>Thanks</p>