clipdir: Copy setwd and the current directory to your clipboard...

Description Usage Details Note Author(s) See Also Examples

View source: R/clipdir.R

Description

Copies the working directory onto your clipboard, and puts it into a "setwd" command.

Usage

1

Details

This is useful if you want to open another instance of R and instantly navigate to the current working directory.

Before R Studio's elegant directory management, this was useful when opening new instances of R. It allows the user to quickly copy the same the same working directory as an existing instance into the new one. Also, it was useful for saving the current wd in a script after manually navigating there. With R Studio just use that for your project management!

It's still useful when testing something in a new instance. For example, if you were working in "C:/Projects/MasterProject/Examp" and you wanted to test something in a new instance of R, you could run clipdir(), open a new instance of R, and paste this command from your clipboard: setwd("C:/Projects/MasterProject/Examp") In the new instance you would be in the old directory with all your local folders. So you can run things in parallel and test/debug/develop.

Note

Only works in Windows because of clipboard.

Author(s)

Gene Leynes

See Also

clipboard,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	## Not run: 

     require(geneorama)

	## Copy the current working directory to your clipboard
	clippdir()

	## Now open a new instance of R and paste in the result.
	
## End(Not run)

geneorama/geneorama documentation built on Oct. 17, 2020, 12:35 a.m.