[R] Strange problem.

Richard A. O'Keefe ok at cs.otago.ac.nz
Tue Sep 2 04:20:32 CEST 2003


Yannong.Dong-1 had a mysterious problem with plot() applied to a function.

I think the basic problem is not that 'if() else' isn't vectorised,
but that 'plot' *is*.  The R documentation is fairly clear if you
know where to look (like ?plot.function), and I know I've seen it
mentioned in one of the R tutorials.

Having a vectorised plot() makes a great deal of sense, but it can be
a surprise to people who aren't used to the vector way of thinking.

It looks as though mention of ?Normal might be useful too.




More information about the R-help mailing list