Without establishing the environment, it would not be possible to write or develop R programming based applications. So for this, you need to know how to set your environment to do R programming. In this chapter, you will learn about this.To start learning R programming, you only need to install the R compiler in your System.
Installation of R
If you are using a Linux system, then your package manager may have R available within, though perhaps not the latest version. For every person else, for installing R, you must have to go to http://www.r-project.org first. Do not get deceived by the slightly outmoded website; it does not reflect on the quality of R. Click the link which says "download R" within the "Getting Started" pane at the foot of that page.
Once you have selected a mirror close to you, choose a link within the "Download and Install R" pane at the peak of the page (according to your operating system). After that, there are 1 or 2 Operating System specific clicks which you must have to make to get to the download.
If you are a Windows user who does not usually like clicking, there is a naughty shortcut for getting the setup file at one go. Just go to http://<CRAN MIRROR>/bin/windows/base/release.htm, and if you are smart enough, it searches it based on your choice then go to https://cran.r-project.org/bin/windows/base/ , and save it in the local disk.
R is compiled and runs on a wide variety of UNIX platforms, Windows and Mac OS.
"R" Installation Steps for Windows Users
When it is a Windows installer, i.e., having .exe as extension; having the name "R-version-win.exe", you can double click and run the installer allowing the default settings. If you have Windows as the 32-bit version, it installs the 32-bit version. But if you have windows as 64-bit, then it will install 32-bit and 64-bit versions both.
"R" Installation Steps for Linux Users
If you are a Linux user, then there is a fast and easy command used in Linux which can be used to install R. The yum command is used for installing like this:
$ yum install R
For Ubuntu Linux or other Debian-related OSs, a more direct method is:
$ apt-get install r-base
Choosing the Appropriate IDE
If you are thinking about using R under Windows or Mac OS, there are several graphical user interfaces (GUIs) available, which will be having a command-line interpreter that displays plots, help pages, and a fundamental text editor. Using R in this way is entirely reliable, but for serious coding, you should use at least one powerful text editor. Many text editors are available online for programmers.
R Studio is one of the popular R-programming specific IDEs, often used as IDEs for R. Another is Emacs ESS. Although Emacs calls itself as a text editor, 36 years (still developing) has positioned itself with a unique number of features. It can be available from http://www.gnu.org/software/emacs/.