In this chapter, we are going to introduce the R environment, learn how to install and use it, and introduce some of the main concepts related to writing R code. First, the technical issues of setting up the work environment are covered. After that, we will have R running and ready to receive instructions from the user. The basic concepts related to working in the R environment are also introduced.
In this chapter, we'll cover the following topics:
Installing R
Using R's command line
Editing code using text editors
Executing simple commands
Arithmetic operations
Logical operations
Calling functions
Understanding errors and warning messages
Checking which class a given object belongs to