2  Introduction

The S Programming Language is a statistical programming language developed at Bell Labs “to turn ideas into software, quickly and faithfully” (Chambers 1998).

R is a modern implementation of the S language and part of the GNU Project.

R is an interpreted language, allowing interactive work with data. It is written in C, Fortran, and R itself.

Some of R’s strengths:

See also: What is R? on the R Project website.

This book was compiled using R version 4.3.1 (2023-06-16).
Make sure you have the latest version by visiting the R project website.

New versions of R are released regularly and it is a good idea to keep your version of R and installed packages updated.

You can get the version of R currently in use by printing the version object:

version
               _                           
platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          3.1                         
year           2023                        
month          06                          
day            16                          
svn rev        84548                       
language       R                           
version.string R version 4.3.1 (2023-06-16)
nickname       Beagle Scouts               

It’s also a good idea to keep a log of the version of R and installed packages when beginning a new project. An easy way to do this is to save the output of sessionInfo():

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.0

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] htmlwidgets_1.6.2 compiler_4.3.1    fastmap_1.1.1     cli_3.6.1        
 [5] tools_4.3.1       htmltools_0.5.6   rstudioapi_0.15.0 yaml_2.3.7       
 [9] fansi_1.0.4       rmarkdown_2.25    knitr_1.44        jsonlite_1.8.7   
[13] xfun_0.40         digest_0.6.33     rlang_1.1.1       evaluate_0.21