As detailed in the introduction, R is an ex-
tremely versatile open source programming
language for statistics and data science. It is
widely used in every field where there is data—
business, industry, government, medicine, academia,
and so on.
In this chapter, you’ll get a quick introduction to R—how to invoke it,
what it can do, and what files it uses. We’ll cover just enough to give you
the basics you need to work through the examples in the next few chapters,
where the details will be presented.
R may already be installed on your system, if your employer or univer-
sity has made it available to users. If not, see Appendix A for installation
instructions.
1.1 How to Run R
R operates in two modes: interactive and batch. The one typically used is inter-
active mode. In this mode, you type in commands, R displays results, you
type in more commands, and so on. On the other hand, batch mode does
not require interaction with the user. It’s useful for production jobs, such as
when a program must be run periodically, say once per day, because you can
automate the process.
1.1.1 Interactive Mode
On a Linux or Mac system, start an R session by typing R on the command
line in a terminal window. On a Windows machine, start R by clicking the
R icon.
The result is a greeting and the R prompt, which is the > sign. The
screen will look something like this:
R version 2.10.0 (2009-10-26)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
...
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
You can then execute R commands. The window in which all this
appears is called the R console.
C0bra5; Start Time - 0:00.500; End Time - 2:59.900; Total Time - 2:59.400
Greetings Guardians! We are excited to announce The Final Shape Speedrun Tournament, a cross-community event designed to bring us together for one simple goal - to go as fast as possible. For this event, Speedrun Panel and Lowman have come together to create a multi-day marathon filled with top leve