Update R script for OS-independent graphics driver