See ?range. And note that I changed plot to more explicitly show what is
being plotted.
HTH, Andy


#~~~~~~~~~~~~~~~~~~
n.Plot <- function(x,my,sigma) {
e <- exp(1)
names(x) <- x
f.x <- (1/(sigma*sqrt(2*pi)))*e^(-1*(((x-my)^2)/2*(sigma^2)))
plot(x, f.x, type="l", xlim = range(x))
return(f.x)
}

n.Plot(seq(-5,5,0.01),0,1)
n.Plot(seq(-50,50,0.01),0,0.1)

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to