r scripts updated