#define x-values x <- seq(0, 2, by=0.01) #calculate gamma density for each x-value y <- dgamma(x, shape=5) #create density plot plot(y)