modify r scripts