R-alpha: More problems with R0.50.a1
Fri, 1 Aug 1997 08:38:12 +1200 (NZST)
I can easily respond to some of the questions.
2) That's the same thing S does (they don't propagate names though). There
are many instances where coercion or subsetting causes a loss of
dimensioning information. In this case you are asking for a subset of the
values in x; you haven't specified a format for them so they come back as
3) Sorry about that; I was working without cut and paste as we transferred
to the new machine.
4) b is defined in the environment created for the evaluation of p.
The function s has as its parent the global environment (that's the
environment that was active when s was defined). There is no value for
b stored there hence s cannot find it. What you seem to want here
is really dynamic scope rather than lexical scope. Dynamic scope was
used in the early Lisp implementations but was quickly seen to be a
mistake and I don't believe that it is used by any active languages
(apart from people trying to fake it in Splus).
It's reasonably easy to tweak R to have this rather than lexical scope
but the down side is pretty large. Imagine a more complicated system
with a much deeper call stack; now s will grab the definition of b that
is closest to it in the call stack; this may not be the one you want and
it can take forever to find the problem.
5) I think Ross has fixed this. At least both of the functions you gave
run without error in the version I've got now. We will probably put up
some patches pretty soon.
6) This will take some work. I'm still unconvinced that any of this Method
stuff deserves any effort whatsoever. It has to be a better idea to write
a real object system rather than try to constantly patch this thing. But
I will spend some time digging around. To see where idx has disappeared.
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: firstname.lastname@example.org