updated R scripts and images