Updated some R scripts