[This article was first published on R – Greetz to Geeks, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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(“..”)
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()
To leave a comment for the author, please follow the link and comment on their blog: R – Greetz to Geeks.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.