update makefile to use R scripts rather than command line functions