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.

2.1 Keeping up to date

This book was compiled using R version 4.4.2 (2024-10-31).
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          4.2                         
year           2024                        
month          10                          
day            31                          
svn rev        87279                       
language       R                           
version.string R version 4.4.2 (2024-10-31)
nickname       Pile of Leaves              

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.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.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.4 compiler_4.4.2    fastmap_1.2.0     cli_3.6.3        
 [5] tools_4.4.2       htmltools_0.5.8.1 yaml_2.3.10       rmarkdown_2.29   
 [9] knitr_1.48        jsonlite_1.8.9    xfun_0.49         digest_0.6.37    
[13] rlang_1.1.4       evaluate_1.0.1