I have my r data files and scripts in dropbox. That means that when running on different computers the directory structure is not identical.
Hence I want to let my script check where it is located
something like
proj.dir <- whereamI()
I had found a solution in this group as noted by Thomas
proj.dir <- dirname(sys.frame(1)$ofile)
but after an update it stopped to work and just return an error message
Error in sys.frame(1) : not that many frames on the stack
Is there a way to get the same information?