Working Directory

Changing the working  directory

Just like Matlab, R has a working directory(Folder). There is default
working directory set up at the installation. This directory can be
changed by the user to a specified location (say 
YourFolder) of his/her choice.

Changing the working directory (Windows Users)

On your R-console, go to:

File -> Change dir-> Local Disk (C:) -> Users -> YourFolder


If you are using a Trinity University's computer

File -> Change dir -> Local Disk (C:) -> Users -> Your Trinity University's login -> YourFolder


Changing the working directory (MAC OS Users)

On your R-console, go to:

Misc -> Change Working directory -> Browse to find YourFolder


Changing the working directory ( from the command line)

If you already know the path to the directory of your choice, you can set the working directory directly from the command line.
Suppose the path to your directory is C:/Users/Yourfolder. Then you can set the working directory to Yourfolder by doing:



>setwd("C:/Users/Yourfolder")


Setting the CRAN Mirror

Before
you start working with R, you can set the CRAN Mirror (It a repository,
usually the closest to your physical location, where packages can be
downloaded or updated).  This action itself is not mandatory but it is
advised to do it at the beginning, when you first use R. 

Setting the CRAN mirror (Windows Users)

On your R console, go to:

Packages- > Set CRAN Mirror -> Select the closest mirror to you (I usually select USA(OH))


Setting the CRAN mirror (MAC OS Users)

On your R console, go to:

Packages&data -> CRAN (sources)