From pperkins@ucsd.edu  Tue Jan  2 20:14:32 2001
From: pperkins@ucsd.edu (pperkins@ucsd.edu)
Date: Tue, 2 Jan 2001 21:14:32 +0100 (MET)
Subject: [Rd] pos.to.env and sys.xxx documentation (PR#801)
Message-ID: <200101022014.VAA19397@pubhealth.ku.dk>

Full_Name: peter perkins
Version: 1.2.0
OS: linuxppc
Submission from: (NULL) (24.4.89.36)


i'm assuming that these are shortfalls in the documentation, and not bugs
in the function themselves.

1) the help page for pos.to.env gives two examples:

   Examples:

     pos.to.env(1)
     pos.to.env(length(search()))

the second of these returns NULL which (to me) does not seem to fit
the description of the function.  an explanation of why this seems
to be a special case would be helpful.


2)  the help page for the sys.xxx functions says:

   Notice that even though the `sys.'xxx functions are interpreted,
   their contexts are not counted nor are they reported. There is no
   access to them.

sys.status() seems to violate this description:

> test <- function () sys.status()
> test()
$sys.calls
$sys.calls[[1]]
test()

$sys.calls[[2]]
sys.status()


$sys.parents
[1] 0 1

$sys.frames
$sys.frames[[1]]
<environment: 0x10bf7a94>

$sys.frames[[2]]
<environment: 0x10bf7a5c>


3) the sys.xxx help page says:

   The parent of a function evaluation is the environment in which
   the function was called. It is not necessarily one less than the
   frame number of the current evaluation, nor the environment from
   which it is called.

i think the first sentence ought to read "the environment in which the
function was declared".  unless there is some syntactic subtlety that
makes the environment "in which [it] was called" different from the one
"from which [it] is called".

- peter

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] pos.to.env and sys.xxx documentation (PR#801)
pperkins@ucsd.edu