initial add of R scripts from cadmium