title: How to get pixel data from an image using R
body: <p>Can anyone help me on how to get the RGB pixel data from an image in R?</p>
  
  <p>I need this information to compare differences in bird plumage to aid in the understanding of a speciation event.</p>
  
  <p>My photos are taken by a digital camera and are now as a NEF-file. It doesn't matter which type of file that's needed, I have the possibility to convert the file to whatever I want. However, I would prefer to maintain as much information as possible in the file (i. e. PNG-files are good). </p>
  
  <p>I have tried many packages in R: Pixmap, Raster, ImageMetrics and browsed the internet, tested methods, asked co-students etc. for several weeks trying to solve this problem.
  Here at Stackoverflow I've tried this: <a href="https://stackoverflow.com/questions/6085090/how-to-extract-the-pixel-data-use-rs-pixmap-package">How to extract the pixel data Use R&#39;s pixmap package?</a>, with no luck. My files are also too big for the R window (the entire array doesn't show), and I have difficulties understanding the array produced. The best thing for me would be to get the data as a matrix or in another way that makes it easier to understand what is what.
  I have found loads of similar questions, but in other programs (such as Java, C++, IOS, Matlab, Python etc) which I unfortunately don't know how to use.</p>
  
  <p>My problems might be due to my low skills with this type of work, but I am trying as hard as I can with the background that I have.
  If anyone can help me or give me som tips, I will be very grateful.</p>