Main components of a base R installation

You may be wondering what you get with the installation you just performed, and that is what we are going to look at here. First of all, the base R version comes with a proper interpreter of the most updated version of the R software. This means, if you recall what we learned in the What is R? section, that after performing your installation, the computer will be able to read R code, parse it, and execute instructions composed of parsed code. To get a feel for this, try the following code on your OS command line, choosing the appropriate one:

  • On Windows OS (on PowerShell):
echo "print('hello world')" >> new_script.R
Rscript.exe new_script.R
  • On macOS or Linux OS:
R
print('hello world')

Both of these should result in the evergreen 'hello world' output.

Apart from the interpreter, the R language base version also comes packed with a very basic platform for the development and execution of R code, which is mainly composed of:

  • An R console to execute R code and observe the results of the execution
  • An R script text editor to write down the R code and subsequently save it as standalone scripts (the ones with the .R file extension)
  • Additional utilities, such as functions to import data, install additional packages, and navigate your console history:

This was the way R code was produced and consumed by the vast majority of the R community for a long time. Nowadays, even though it runs perfectly and is regularly updated, this platform tends to appear one step behind the available alternatives we are going to explore in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset