switched called R script