Basic Commands

Everything you will ever do in R comes down to two basic tasks: creating a new R object or processing an existing R object. That might sound abstract right now, but we’ll build up the core ideas through the following steps.

  1. Fundamental Interactions: Using R as a calculator
  2. Objects: Storing data values for subsequent calculations
  3. Extended Operators: Powers, roots, and other useful functions
  4. Logical Comparisons: Asking R TRUE/FALSE questions
  5. Comments: Leaving notes in your code
  6. Environments: Where R keeps your objects

By the end of this module, you’ll be able to run simple calculations in R and write your own simple expressions. These basic interactions are the foundation that every R-based data analysis builds on.

Back to top