Appendix B

Summary of R used in this Book

R is a statistical package that is open source and is distributed under the GNU General Public License (GPL). Like Perl, R is available free from the Web. To download it along with documentation and tutorials, see the instructions at The Comprehensive R Archive Network (CRAN) [34].

This appendix covers two topics. First, it reviews the basics of R. Second, for the functions used in this book, outputs and page numbers are given, so the interested reader can look up examples.

If your interest about R has been piqued, here are three good introductory books. First, Peter Dalgaard’s Introductory Statistics with R [37]. Second, Michael Crawley’s Statistics: An Introduction Using R [35], and, third, Brian Everitt and Torsten Hothorn’s A Handbook of Statistical Analyses Using R [42].


This section describes bare basics of R. In this book, an R session consists of doing a task one step at a time using the command line. However, it has powerful statistical functions, and more can be written by the user, so one step can accomplish much.

B.1.1 Data Entry

The first task is entering the data. If there are only a few values, then these can be manually typed in as shown in output B. 1. Note that the greater than sign is the command prompt, and after typing any command, pressing the enter key runs it.

Output B.1 Entering a scalar, vector, and matrices into R by typing.

In this output, x is a scalar, y is a vector, and both z1 and z2 are ...

Get Practical Text Mining with Perl now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.