MANAGING WORKSPACES USING SETWD AND GETWD FUNCTIONS IN R

The R working environment is called a workspace. The workspaces are stored into a directory and is reloaded the next time you open R. We can choose which directory to be used to store our projects. The standard commands used for managing the workspaces are given below.
To find out your current working directory, the get working directory function can be used. There are no arguments for this function.
getwd()
To change your working directory, use the set working directory function along with the path to the new directory.
setwd(“path/to/the/directory”)
To move up a folder from the current directory, you can make use of,
setwd(“..”)
setnget
To check your command history, just use your Up and Down arrow keys in your keyboard or use,
history()
If you need the complete history of the commands used so far,
history(max.show=Inf) 
To list the objects in your current working directory,
ls()
Advertisements

One thought on “MANAGING WORKSPACES USING SETWD AND GETWD FUNCTIONS IN R

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s