Final bit of debugging on R scripts for now. These should work on dev, R all checks out.