[R-sig-eco] Probability distributions

Kingsford Jones kingsfordjones at gmail.com
Fri Apr 9 19:56:13 CEST 2010


Hi Lene,

See ?curve or ?lines.

Also, plot.function calls curve so the following works:

plot(function(x) dweibull(x, .5, 1), 0, 5, col = 1, ylab = 'density',
     main = 'Weibull densities')
plot(function(x) dweibull(x, 2, 1), 0, 5, col = 2, add = TRUE)
plot(function(x) dweibull(x, .5, .5), 0, 5, col = 3, add = TRUE)
plot(function(x) dweibull(x, 2, .5), 0, 5, col = 4, add = TRUE)
legend('topright', paste('shape =' , c('0.5' ,'2.0', '0.5', '2.0'),
       '   scale =', c('1.0', '1.0', '0.5', '0.5')), lty = 1, col = 1:4)


hth,

Kingsford Jones



On Fri, Apr 9, 2010 at 9:40 AM, Lene Jung Kjaer <jung at siu.edu> wrote:
> Hi,
> This might be a simple question, but I've been trying to figure it out for
> days.
> I have a list of shape and scale parameters (n=15) and want to draw numerous
> Weibull distributions within the same graphs using the parameters.
> Does anyone know how to do that?
> Thanks,
> Lene
>
> ______________________________________
>
> Lene Jung Kjær, PhD. Candidate
> Cooperative Wildlife Research Laboratory
> Southern Illinois University
> Life Science II, Room 269B
> Carbondale, Il 62901
> Phone office: 618-453-5495
> Fax office: 618-453-6944
> Phone home: 618-303-6136
> Email:  <mailto:jung at siu.edu> jung at siu.edu
> ______________________________________
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>



More information about the R-sig-ecology mailing list