Consider that everything that we have done in the textbook so far has
been about applying tools that have already been constructed. We have
been using tools, not making tools.
Sometime you will reach the point where you feel that you could improve
a tool, or you may find a situation for which no tool exists.
At that you moment you have become a programmer. The authors
would like to give you a gentle introduction to programming.
You can study programming deeply and seriously, or you can use it
casually to solve problems that are meaningful only to you, but you
should have an introduction to programming in R, even if it is only at
the level of writing simple functions and iterating processes to improve
your workflow.
Chapters 25 Functions and 26 Iteration will give you
enough practice to prepare you if you choose to go further in future
data science projects.
Programming is problem solving and there is no one way to program
because there is no one way to solve a problem. If you have some
experience programming in another context, some of this will seem more
natural, but you can still use what is being presented to increase your
skills and understand more about what you can do with R.