title: how to download and display an image from an URL in R?
body: <p>My goal is to download an image from an URL and then display it in R.</p>
  
  <p>I got an URL and figured out how to download it. But the downloaded file can't be previewed because it is 'damaged, corrupted, or is too big'.</p>
  
  <pre><code>y = "http://upload.wikimedia.org/wikipedia/commons/5/5d/AaronEckhart10TIFF.jpg"
  download.file(y, 'y.jpg')
  </code></pre>
  
  <p>I also tried</p>
  
  <pre><code>image('y.jpg')
  </code></pre>
  
  <p>in R, but the error message shows like:</p>
  
  <pre><code>Error in image.default("y.jpg") : argument must be matrix-like 
  </code></pre>
  
  <p>Any suggestions?</p>