added R scripts