R Tips

Home

Contact

Steven Holland

Working with directories

22 October, 2009

While saving text and graphics files within R, you may wish to automatically put them into particular folders or directories. To change the folder/directory, use setwd() with the path to the folder.

If you want to create a new folder or directory within R, use dir.create("myNewDirectory"). You can put a full path to the directory; just enclose it in quotes.