Possible Duplicate:
Rscript: Determine path of the executing script
Always I run an R script, it take My Documents
as working directory.
When I run the script, I want to get the script path and change the working directory to it. How I can do this?
I want this to run the scripts in same folder with the source()
function.