Skip to content

syntax confusion with function/non-function objects (PR#694)

2 messages · Luke Tierney, Jonathan Rougier

#
Peter Dalgaard BSA wrote:
I agree--I'd call this a type error in evaluation, not a syntax error.

One thing to keep in mind is that R expressions can be used for things
other that evaluation, for example in representing aspects of models.
Someone might want at some point to attach meaning to something like

	y ~ 2(x)+z

That would be impossible (or at least very dificult) if the expression
were made syntactically invalid.

It would be possible to have a semantic checking tool for R that walks
over the code and warns when it sees such an expression, but it should
not be considered an error since it could be legitimate.

luke
#
On Fri, 13 Oct 2000, Luke Tierney wrote:

            
I see the point.  It might be helpful to change the R error message in
line with Splus so that the source of the error is easy to identify.

Jonathan.

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE
http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._