change R script with Gustavo