Chapter 1. The R Environment

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

Installing R and using the command line ...

Get Learning R for Geospatial Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.