Skip to main content Accessibility help
Internet Explorer 11 is being discontinued by Microsoft in August 2021. If you have difficulties viewing the site on Internet Explorer 11 we recommend using a different browser such as Microsoft Edge, Google Chrome, Apple Safari or Mozilla Firefox.

Chapter 1: An introduction to R

Chapter 1: An introduction to R

pp. 1-19

Authors

, University of Alberta
  • Add bookmark
  • Cite
  • Share

Summary

In order to learn to work with R, you have to learn to speak its language, the S language, developed originally at Bell Laboratories (Becker et al., 1988). The grammar of this programming language is beautiful and easy to learn. It is important to master its basics, as this grammar is designed to guide you towards the appropriate way of thinking about your data and how you might want to carry out your analysis.

When you begin to use R on an Apple Macintosh or a Windows PC, you will start R either through a menu guiding you to applications, or by clicking on R's icon. As a result, a graphical user interface is started up, with as its central part a window with a prompt (>), the place where you type your commands. On unix or linux systems, the same window is obtained by opening a terminal and typing R at its prompt.

The sequence of commands in a given R session and the objects created are stored in files named .Rhistory and .RData when you quit R and respond positively to the question of whether you want to save your workspace. If you do so, then your results will be available to you the next time you start up R. If you are using a graphical user interface, this .RData file will be located by default in the folder where R has been installed.

About the book

Access options

Review the options below to login to check your access.

Purchase options

eTextbook
US$77.00
Paperback
US$77.00

Have an access code?

To redeem an access code, please log in with your personal login.

If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.

Also available to purchase from these educational ebook suppliers