I would like to plot a gamma distribution in R where the scale paramter (alpha) stays the same but the convolution paramter changes (all in 1 graph). I know dgamma but don't really know what the x argument means. I would like to just draw the function by providing alpha and beta. Is this doable?
The output of your solution is shapes <- c(2,5,6,12)
> plot(dgamma.wrapper, from=0, to=10)
Error in plot(dgamma.wrapper, from = 0, to = 10) :
object 'dgamma.wrapper' not found
> for (i in seq_along(shapes))
+ lines(dgamma(x,shape= shapes[i] , scale = 1) , from=0, to=10, col=i)
Error in dgamma(x, shape = shapes[i], scale = 1) : object 'x' not found
>