Re: [R] return the name of source.

2013-08-27 Thread nevil amos
Thanks this does it: script.name <- basename(sys.frame(1)$ofile) On Tue, Aug 27, 2013 at 4:07 PM, Henrik Bengtsson wrote: > See findSourceTraceback() of R.utils. /Henrik > > On Mon, Aug 26, 2013 at 10:58 PM, peter dalgaard wrote: > > > > On Aug 27, 2013, at 07:12 , nevil amos wrote: > > > >

Re: [R] return the name of source.

2013-08-26 Thread Henrik Bengtsson
See findSourceTraceback() of R.utils. /Henrik On Mon, Aug 26, 2013 at 10:58 PM, peter dalgaard wrote: > > On Aug 27, 2013, at 07:12 , nevil amos wrote: > >> Is there a fuction that will allow me to retrun the filename for a script >> from within that script. > > Not a standard one, but you shou

Re: [R] return the name of source.

2013-08-26 Thread peter dalgaard
On Aug 27, 2013, at 07:12 , nevil amos wrote: > Is there a fuction that will allow me to retrun the filename for a script > from within that script. Not a standard one, but you should be able to get at it via a bit of breaking and entering: sys.status() and friends (sys.calls, sys.frames) give