correct R file, some errors

wrong version of file was pushed