Statistiek: introductie tot R


3. Programming basics
07 oktober 2020 23:00

We teach R because it greatly facilitates data analysis, the main topic of this book. By coding in R, we can efficiently perform exploratory data analysis, build data analysis pipelines, and prepare data visualization to communicate results. However, R is not just a data analysis environment but a programming language. Advanced R programmers can develop complex packages and even improve R itself, but we do not cover advanced programming in this book. Nonetheless, in this section, we introduce three key programming concepts: conditional expressions, for-loops, and functions. These are not just key building blocks for advanced programming, but are sometimes useful during data analysis. We also note that there are several functions that are widely used to program in R but that we will not cover in this book. These include split, cut, do.call, and Reduce, as well as the data.table package. These are worth learning if you plan to become an expert R programmer.

Titel Voortgang groep
3.0 Introduction
3.1 Conditional expressions
3.2 Defining functions
3.3 Namespaces
3.4 For-loops
3.5 Vectorization and functionals
3.6.1 Conditionele expressie
3.6.2 Any en all
3.6.3 Conditionele veranderingen
3.6.4 Som van de eerste n getallen
3.6.5 Functies van meerdere variabelen
3.6.6 Namespace
3.6.7-8 Som van de eerste n kwadraten
3.6.9 Som van de eerste n kwadraten (II)
3.6.10 Som van de eerste n kwadraten (III)