title: Function to display RGB arrays in R
body: <p>I'm looking for a function to display RGB pictures represented as 3-dimensional arrays to RStudio graphics device. For example, I've read a jpeg</p>
  
  <pre><code>library(jpeg)    
  pic &lt;- readJPEG(example.jpg)
  str(pic)
  </code></pre>
  
  <p><code>num [1:360, 1:480, 1:3] 0.106 0.106 0.106 0.106 0.106 ...</code></p>
  
  <p>Then how to print it to RStudioGD? The thing is that I want to do some manipulations with this array, so I want to be able to look at the picture right in RStudio.</p>