title: statement to skip empty data frames in a function
body: <p>I have a function similar to this in <code>R</code>, which uses a <code>df</code> as main argument. However, the df could be empty and I would like to skip those if I run the function using <code>lapply</code>
  e.g <code>lapply(FileNames, function(y) my.function(y))</code></p>
  <p>my function looks like this</p>
  <pre><code>my.function &lt;- function(table) {
  file &lt;- read.csv(table, header=T)
  
    if(nrow(table) == 0) 
     {next}
  
  #skip the df if is empty and stop processing that df
  #do more stuffs if not empty
  }
  </code></pre>
  <p>I've tried this so far but if the data frame is empty the whole process crashes, any tip?</p>