update: shell script done and working with the R scripts