I have monthly precipitation data for a rain gauge for 30 years and by means of which, firstly I need to carry out gamma distribution model in R studio software and then change the gamma cumulative function to standard cumulative function and obtain SPI (standard precipitation Index ) in order to evaluate the drought stricken times. As a result,I would be highly grateful if you can help me how should I perform gamma model and obtain SPI in R studio software?