1.1 R for Actuarial Science?1.1.1 From Actuarial Science to Computational Actuarial Science1.1.2 The S Language and the R Environment1.1.3 Vectors and Matrices in Actuarial Computations1.1.4 R Packages1.1.5 S3 versus S4 Classes1.1.6 R Codes and Efficiency1.2 Importing and Creating Various Objects, and Datasets in R1.2.1 Simple Objects in R and Workspace1.2.2 More Complex Objects in R: From Vectors to Lists1.2.2.1 Vectors in R1.2.2.2 Matrices and Arrays1.2.2.3 Lists1.2.3 Reading csv or txt Files1.2.4 Importing Excel® Files and SAS® Tables1.2.5 Characters, Factors and Dates with R1.2.5.1 Strings and Characters1.2.5.2 Factors and Categorical Variables1.2.5.3 Dates in R1.2.6 Symbolic Expressions in R1.3 Basics of the R Language1.3.1 Core Functions1.3.2 From Control Flow to “Personal” Functions1.3.2.1 Control Flow: Looping, Repeating and Conditioning1.3.2.2 Writing Personal Functions1.3.3 Playing with Functions (in a Life Insurance Context)1.3.4 Dealing with Errors1.3.5 Efficient Functions1.3.6 Numerical Integration1.3.7 Graphics with R: A Short Introduction1.3.7.1 Basic Ready-Made Graphs1.3.7.2 A Simple Graph with Lines and Curves1.3.7.3 Graphs That Can Be Obtained from Standard Functions1.3.7.4 Adding Shaded Area to a Graph1.3.7.5 3D Graphs1.3.7.6 More Complex Graphs1.4 More Advanced R1.4.1 Memory Issues1.4.2 Parallel R1.4.3 Interfacing R and C/C++1.4.4 Integrating R in Excel®1.4.5 Going Further1.5 Ending an R Session1.6 ExercisesFigure 1.1Figure 1.2Figure 1.3Figure 1.4Figure 1.5Figure 1.6Figure 1.7Figure 1.8Table 1.1Table 1.2