Use fitdist parameters in variables I'm sure this is a simple problem, but I'm not sure how to search and find the answer. I have a set of parameters that I've estimated using 'fitdist':
Fitting of the distribution ' gamma ' by matching moments 
Parameters:
       estimate
shape 0.2018062
rate  3.1255336

Now I want to pull those parameters and store them in variables. But I can't figure out how to separate them. I've tried:
> gamma.fit$estimate
    shape      rate 
0.2018062 3.1255336 

But how do I pull the specific elements? (e.g. shape = 0.2018062 and rate = 3.1255336)
I've tried using normal data frame tools but I get an 'incorrect number of dimensions' error. Any ideas would be greatly appreciated.
 A: Using the fitdistr function from MASS, you can access the estimated parameters like I did it below. The same holds for fitdistrplus:::fitdist.
op <- options(digits = 3)
set.seed(123)
x <- rgamma(100, shape = 5, rate = 0.1)
ft <- fitdistr(x, "gamma")
ft$estimate["shape"]
   shape 
6.486991 
# or
ft$estimate[1]
   shape 
6.486991 

Same goes for rate.
If you do str(ft$estimate) you will see that this is a named vector. Since it's named, you can call it by name (["shape"]) or by index ([1]).
 Named num [1:2] 6.487 0.137
 - attr(*, "names")= chr [1:2] "shape" "rate"

A: In case anyone is still interested: you can just do this:
gamma.fit$estimate['shape']
gamma.fit$estimate['scale']

A: Suppose we already did fitdist [in case of library(fitdistrplus) for "nbinom". 
To get desired parameters, following can use
SZ = as.numeric(as.vector(data.frame(unlist(fitNB))[1,])) # get size
MU = as.numeric(as.vector(data.frame(unlist(fitNB))[2,])) #get mu 

Hope it helps too.
A: In case anyone is still interested in this question, you can also do the following.
Assume the dataframe is called foo. The parameters can be called as
 foo[["estimate"]][["shape"]]
 foo[["estimate"]][["rate"]]

If you are using Rstudio and go into the object, mouse down the right-hand side, You will see a little box with a green arrow pointing to the left. If you click on that box, on your row of interest, it will paste the extraction code for the parameter of interest into the console window.
That's a neat little trick I learned today as I was pulling estimates. (What does this little box thing do?)
