我試圖繪製Gamma(alpha = 29,beta = 3),但我得到的錯誤:「xy.coords(x,y,xlabel,ylabel,log)中的錯誤:'x'和'y'長度不同」。爲什麼?xy.coords(x,y,xlabel,ylabel,log)中的錯誤:'x'和'y'長度因Gamma分佈圖而有所不同
x <- seq(0, 1000, by = 1)
y <- dgamma(x, shape = 3, rate = 1/29, scale = 1/rate, log = FALSE)
plot(x, y, xlabel = "x", ylabel = "Gamma(29,3)")