library(MASS)
op <- options(digits = 3)
set.seed(123)
x <- rgamma(100, shape = 5, rate = 0.1)
fitdistr(x, "gamma")

x<-rnorm(10000)
fitdistr(x,"normal")
fitdistr(x,"chi-squared")