Probability density functions in R

Hi, community
Is there function or package for fitting probability density functions, deriving fit parameters, and comparing theoretical and predicted values for goodness-of-fit tests? Like normal, gama, weibull and others.
Thanks for all the help.

The MASS package includes the fitdistr() function. The fitdistrplus package extends the fitdistr() function.

I'm sure there are other possibilities.