Convert RasterLayer into data.frame of colors for each pixel that can be used for plotting
Useful links