Re: [R] (Novice-) Problem with the plot-function

2004-02-06 Thread Douglas Bates
Sundar Dorai-Raj [EMAIL PROTECTED] writes: I think you meant to do plot(x, f.x, ...) BTW, you've re-invented the wheel. See ?dnorm for evaluating the normal pdf. Best, Sundar Even easier is to combine dnorm and curve (although Luke will grimace at the syntax). curve(dnorm(x, mean =

Re: [R] (Novice-) Problem with the plot-function

2004-02-05 Thread Sundar Dorai-Raj
I think you meant to do plot(x, f.x, ...) BTW, you've re-invented the wheel. See ?dnorm for evaluating the normal pdf. Best, Sundar Felix Eschenburg wrote: Hello, i have written this little function to draw different normal distributions: n.Plot - function(x,my,sigma) { e - exp(1) names(x) - x

Re: [R] (Novice-) Problem with the plot-function

2004-02-05 Thread Felix Eschenburg
Thank you all, that did the trick. Sometimes i can be a real blockhead. [EMAIL PROTECTED] (Felix Eschenburg) writes: Hello, i have written this little function to draw different normal distributions: n.Plot - function(x,my,sigma) { e - exp(1) names(x) - x f.x -

Re: [R] (Novice-) Problem with the plot-function

2004-02-05 Thread DJNordlund
Felix, there may be more elegant ways of plotting the normal curve, but given your current program, you can simply change your plot statment to use a formula: plot(f.x ~ x, type=l, xlim=c(-5,5)) Dan Nordlund -Original message-- In a message dated 2/5/2004 2:52:04 PM Pacific