Learning R in Practice

Learning R in Practice

Introduction

Language basis

Convention

Throughout this book, I will adopt the following conversion to make the context clear.

  • This is a code block
    print(var)
    
  • This a concrete name of a command or function: function_name,
  • This is a variable name that you can change var,
  • This is something you need to pay attention: Attention.

Use R

I do not intent to introduce the very basis of R. But let me assume the reader has zero background.

In the command line environment, start R by typing

> R

To quit, simply type:

q()

To get help on a function:

?function

or a more general word:

??word

And in the R environment, # indicates the rest of that line is comment.