Appendix D

Introduction to R software

D.1 Becoming familiar with R

R is a free software environment, widely used for statistical calculations and graphics. It runs under various operating systems and can be downloaded from the website www.r-project.org. After installing the program in the Windows operating system and clicking on the R icon, the R Console appears as in Figure D.1. The routines provided in this book have been prepared in R version 2.15.2.

Figure D.1 R Console for the Windows operating system.

a04f001

The R Console is an editable window, in which users can write commands and look at the results of calculations. When graphics are generated, they appear in a separate window. Commands are displayed in red, while all results are in blue, though this colour scheme can be changed by the user if desired.

One of the most important things to remember when working with the R Console is the choice of workspace. This refers to a file folder in which the data files, R code fragments, and results are stored. This can be set by clicking on File in the main menu and selecting Change dir... as in Figure D.2.

Figure D.2 Changing the directory.

a04f002

R offers plenty of different packages designed for numerous applications, which may be loaded either from the Internet website www.r-project.org ...

Get Statistical Analysis in Forensic Science: Evidential Values of Multivariate Physicochemical Data now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.