Skip to main content Accessibility help
×
Hostname: page-component-76d6cb85b7-7262s Total loading time: 0 Render date: 2026-07-14T03:41:20.750Z Has data issue: false hasContentIssue false

1 - An introduction to R

Published online by Cambridge University Press:  05 June 2012

R. H. Baayen
Affiliation:
University of Alberta
Get access

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.

Information

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Book purchase

Temporarily unavailable

Save book to Kindle

To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • An introduction to R
  • R. H. Baayen, University of Alberta
  • Book: Analyzing Linguistic Data
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511801686.002
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • An introduction to R
  • R. H. Baayen, University of Alberta
  • Book: Analyzing Linguistic Data
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511801686.002
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • An introduction to R
  • R. H. Baayen, University of Alberta
  • Book: Analyzing Linguistic Data
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511801686.002
Available formats
×