search for: findsourcetraceback

Displaying 2 results from an estimated 2 matches for "findsourcetraceback".

2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script from within that script. fir instance If I have a script "myscript.r": FileName<-unknown.fucntion() print(FileName) and run it source("myscript.r") will return "myscript.r" Thanks Nevil Amos [[alternative HTML version deleted]]
2010 Oct 06
3
Source awareness?
Here the general (perhaps silly question) first: Is it possible for a script to find out if it was sourced by another script or run directly? Here a small example with two scripts: # script A print ("This is script A") # script B source("C:/scriptA.R") print ("This is script B") I would like to modify script A in a way so that it only outputs 'This is script