Adding R script for images