s-news
[Top] [All Lists]

Re: problems with frames: Simplification: incorrect behavior

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: Re: problems with frames: Simplification: incorrect behavior
From: "Fomenko, Igor" <ifomenko@amgen.com>
Date: Fri, 21 Oct 2005 15:16:03 -0700
Patrick's reply and the ref to the chapter on formulas in his book
helped a lot.

Now I would like to ask where is the documentation on the difference in
the behavior for x=5 and x=c(1,2) for this code:

stff<-function(x){

  return(sys.frame())
           }

stff1<-function(x){
  x<- x
  return(sys.frame())
           }

Results:

> stff(5)
$x:
[1] 5

> stff1(5)
$x:
[1] 5

> stff1(c(1,2))
$x:
[1] 1 2

> stff(c(1,2))
list()
> 

Definitely it contradicts to the documentation of sys.frame()

"sys.frame returns the list of objects in frame which. By default, which is
the frame in which the call to sys.call is made. "


Please, help.

Thanks,

-Igor Fomenko

SI Lead at Amgen

<Prev in Thread] Current Thread [Next in Thread>
  • Re: problems with frames: Simplification: incorrect behavior, Fomenko, Igor <=