[R] Funny warning message

John Logsdon j.logsdon at lancaster.ac.uk
Wed Apr 7 10:11:16 CEST 1999



> 
> JL> Warning: ingnored non-function "t"
> 

Many thanks to all who took the time to point out the blindingly obvious!

I frequently use single letters in various languages for short-term
(sometimes local to a function) variables.  In fact my Fortran
indoctrination still leads me to be uncomfortable with any loop counter
other than i-l!  This had only rarely happened and didn't appear to do any
damage.

So, as an entry to the wish-list, since R handles it correctly, wouldn't
it be better to suppress the warning message - via an option statement.
After all t() is clearly different to t[ ] or t so the context should be
able to determine what is really wanted.  (Mind you, I wouldn't go as far
as Algol68, where if I remember clearly, a legal command would be: if if
then then else else := if not then do else end!) 

Perhaps options(sloppy=TRUE)?

As a second entry to the wish-list, would it be possible to set an option
that ensured vector lengths were strictly matched?  I find that whenever I
drop a booboo and have mismatched vector length, the warning message
indicates that I have indeed done something wrong.  At the moment, I can't
conceive of a situation when an operation on two vectors where one is not
the same length as the other *or* one is effectively a scalar (vector
length 1) can be a legal statement.  Maybe some library functions do
assume this, in which case the user (or function) could store the option
an switch it off during the body.

Perhaps options(vector.match=TRUE)?

Since I don't use S+, I don't know what they do but S+ is not the oracle
anyway.

John

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list