You can use the dirname() function in R to get the parent directory of a file. The dirname() function takes the full path of a file as an argument and returns the directory that contains the file.
Here's an example:
main.r219 chars9 lines
This will output the parent directory of the file:
main.r32 chars2 lines
gistlibby LogSnag