[R] definition of a function

KARAVASILIS GEORGE gkaravas at ee.duth.gr
Wed Oct 29 05:21:37 CET 2008

Hello, R subscribers.
I would like to define a function like this one:
Fun <- function(x)    sin(x)/x
with value 1 at x=0. How can I do that?
Is there a way to plot it "symbolically", without using x as a vector?
x <- seq(from=-10, to=10, length=100)
plot(x, Fun(x))
Thank you in advance.

More information about the R-help mailing list