title: how do I go to next iteration of a for loop in R?
body: <p>I am trying to read CSV files with different names. 
  In my for loop, with different values of i, it checks for the file and import the file. There are some values of i, which is not associated with any file name.</p>
  
  <p>Here, my question is how do I go to next iteration?
  Thank you in advance!</p>
  
  <pre><code>for (i in 17:23)
  {
    path= file.path(paste0("2017-02-23 ", i, "_00_00/Registrations.csv"))
    if(!file.exists(path))
    data= read.table(path, header = F,    sep=",")
    datalist= list(data)
    else print(NA)
  }
  
  
  
  
  
  &gt; for (i in 17:23)
  + {
  +   path= file.path(paste0("2017-02-23 ", i, "_00_00/Registrations.csv"))
  +   if(!file.exists(path))
  +   data= read.table(path, header = F,  sep=",")
  +   datalist= list(data)
  + }
  Error in file(file, "rt") : cannot open the connection
  In addition: Warning message:
  In file(file, "rt") :
    cannot open file '2017-02-23 19_00_00/Registrations.csv': No such file or directory
  </code></pre>