R SCRIPT