title: File.exists() doesn't work
body: <p>I have to be either blind or stupid, but I cannot move forward with this:</p>
  
  <p>I have a variable sourceName defined as:</p>
  
  <pre><code>sourceName = file.path(dataDatabase, dates[1], paste0(exchange, "_", ticker, "_trade.csv"))
  </code></pre>
  
  <p>which is this string:</p>
  
  <pre><code> "/home/malejg/goxtrader/data/2014-12-12/Bitfinex_BTC_trade.csv"
  </code></pre>
  
  <p>When I check the existenece of the file, I got the following result:</p>
  
  <pre><code>&gt; file.exists(sourceName)
  &gt; [1] TRUE
  </code></pre>
  
  <p>so the file definitely exists. But when I use the above code in the if statement going like:</p>
  
  <pre><code> if(file.exists(sourceName)){
      some sample code here}
  </code></pre>
  
  <p>it throws an error:</p>
  
  <pre><code> Error in if (file.exists(sourceName)) { : argument is of length zero
  </code></pre>
  
  <p>How is it possible?
  The code works fine on Windows, so is there some Linux related problem?</p>
  
  <p><strong>SESSION INFO:</strong></p>
  
  <blockquote>
    <p>sessionInfo()  R version 3.1.2 (2014-10-31) Platform:
    x86_64-pc-linux-gnu (64-bit)</p>
    
    <p>locale:  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C<br>
    [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8      [5]
    LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8     [7]
    LC_PAPER=en_US.UTF-8       LC_NAME=C                   [9]
    LC_ADDRESS=C               LC_TELEPHONE=C             [11]
    LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       </p>
    
    <p>attached base packages: [1] stats     graphics  grDevices utils<br>
    datasets  methods   base     </p>
    
    <p>other attached packages: [1] data.table_1.9.4 xts_0.9-7<br>
    zoo_1.7-11      </p>
    
    <p>loaded via a namespace (and not attached): [1] chron_2.3-45<br>
    grid_3.1.2      lattice_0.20-30 plyr_1.8.1      [5] Rcpp_0.11.5<br>
    reshape2_1.4.1  stringr_0.6.2   tools_3.1.2</p>
  </blockquote>