Part II: General Programming
In this portion of the textbook, we’ll talk about the basics of programming in a general sense (that is, we’re not yet focusing on programming with data).
Before we start in on the hard stuff, we’ll quickly go through what programming is and what the vocabulary of a programming language looks like in 7 Introduction to Programming.
8 Variables and Basic Data Types will discuss the basics: variable types, how to assign variables, and how to convert between simple variable types.
9 Using Functions and Libraries will discuss how to use built-in and package functions to make R and python more powerful. After this section, you should be able to use R or Python as a calculator.
10 Data Structures will discuss the use of vectors and matrices in R and Python. Along the way, you’ll get a quick refresher in mathematical logic - the use of And, Or, and Not.
If you’ve had linear algebra, 11 Matrix Calculations will tell you how to use R and python to perform matrix calculations. If you haven’t had linear algebra yet, skip this section and move on to 12 Control Structures.
12 Control Structures will discuss control structures - ways to change the flow of a program based on variable values and operating condition. This will include discussions of if-statements and different types of loops.
13 Writing Functions will discuss writing your own functions.
Once we’ve covered these topics, we should be ready to focus on programming with, for, and on data.