title: R Error cannot open the connection using url
body: <p>I've been working on this code for a while now, basically I need to read the files from <a href="ftp://agrofawn-prod01.osg.ufl.edu/pub/howard/georgia/" rel="nofollow">this</a> directory, but I keep getting an error "cannot open the connection", please help me to see which part went wrong?</p>
  
  <p>Hope this code doesn't confuse you much, really wanted to figure out how to get all the files end with .M files(.M09 or .M10) from the above link, if you have better ideas of achieving that, please help, thank you.</p>
  
  <pre><code>file.path.in &lt;- file.path("C:", "Users", "agclim", "GAData", fsep=.Platform$file.sep); # Windows                             
  file.extension &lt;- c("(\\.M\\d{2})"); 
  filename.in.all &lt;- list.files(file.path.in, pattern=paste(file.extension,"+$",sep=""), full.names=FALSE);    
  filename.in.all &lt;- sort(filename.in.all, decreasing=FALSE);        
  library("gdata");
  for (i.in in 1:length(filename.in.all)) { 
      cat(paste("The data in the",filename.in.all[i.in],"file are processing now.", sep=" "), "\n");
      url.conn.server &lt;- url(file.path("ftp://agrofawn-prod01.osg.ufl.edu","pub", "howard","georgia",filename.in.all[i.in],fsep=.Platform$file.sep), open="r", blocking=TRUE, encoding=getOption("encoding"));    
      data.01 &lt;- readLines(url.conn.server, n=-1, ok=TRUE);                     
      unlink(url.conn.server);
      close(url.conn.server);
  }
  </code></pre>