R Studio is an integrated development environment(IDE) for R. IDE is a GUI, where you can write your quotes, see the results and also see the variables that are generated during the course of programming.
- R Studio is available as both Open source and Commercial software.
- R Studio is also available as both Desktop and Server version.
- R Studio is also available for various platforms such as Windows, Linux, and macOS.
R Studio can be downloaded from its official Website rstudio.com and instructions for installation are available on How to Install RStudio for R programming in Windows?
After the Installation process is over, the R Studio Interface looks like:
- The console panel(left panel) is the place where R is waiting for you to tell it what to do, and see the results that are generated when you type in the commands.
- To the top right, you have Environmental/History panel. It contains 2 tabs:
- Environment tab: It shows the variables that are generated during the course of programming in a workspace which is temporary.
- History tab: In this tab, you’ll see all the commands that are used till now from the start of usage of R Studio.
- To the right bottom, you have another panel, which contains multiple tabs, such as files,
plots, packages, help, and viewer.
- The Files tab shows the files and directories that are available within the default workspace of R.
- The Plots tab shows the plots that are generated during the course of programming.
- The Packages tab helps you to look at what are the packages that are already installed in the R Studio and it also gives a user interface to install new packages.
- The Help tab is the most important one where you can get help from the R Documentation on the functions that are in built-in R.
- The final and last tab is that the Viewer tab which can be used to see the local web content that’s generated using R.
Set the working directory in R Studio
R is always pointed at a directory on our computer. We can find out which directory by running the getwd() function. Note: this function has no arguments. We can set the working directory manually in two ways:
You can use this function setwd() and give the path of the directory which you want to be the working directory for R studio, in the double codes.
To set the working directory from the GUI you have to click on this 3 dots button. When you click this, this will open up a file browser, which will help you to choose your working directory.
This will select the current directory, which you have chosen using this file browser as your working directory. Once you set the working directory, you are ready to program in R Studio.
- Creation and Execution of R File in R Studio
- Clear the Console and the Environment in R Studio
- How to Install R Studio on Windows and Linux?
- Link your GitHub Account with R Studio
- Introduction to R Programming Language
- Introduction to R Markdown
- Introduction to Machine Learning in R
- 8 Coding Style Tips for R Programming
- AB Testing With R Programming
- Distance Matrix by GPU in R Programming
- Completely Randomized Design with R Programming
- Correlation Matrix in R Programming
- Randomized Block Design with R Programming
- Encapsulation in R Programming
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.