[R] Name of frame
Tom Backer Johnsen
backer at psych.uib.no
Thu Mar 11 14:10:04 CET 2010
Hmm. I need to do some pondering on that one. I do not really
understand it, at least not yet.
Tom
Barry Rowlingson wrote:
> On Thu, Mar 11, 2010 at 12:30 PM, Tom Backer Johnsen
> <backer at psych.uib.no> wrote:
>
>> Is it possible to get hold of the name of a frame?
>>
>>
>
> I can't see a direct way, but you could capture the output of print:
>
> > framename=function(frame){capture.output(print(frame))}
> > foo=function(x){framename(sys.frame(1))}
> > foo()
> [1] "<environment: 0x8eb451c>"
>
> any good?
>
> Barry
>
More information about the R-help
mailing list