Thank you so much for your clarification. I was trying to get the quantiles from a given gamma distribion using a vector of probabilites.
For example:
shape=3.5
scale=1.5
x=c(2,5,100)
pp=pgamma(x, shape=shape, scale=scale)
qgamma(pp, shape=shape, scale=scale)
I was expecting ~100 instead of "InF" in the last line of the code.