These are all free to download; they are not main textbooks but I sometimes consult them for the class and could potentially be useful for you to consult in the future:
For R programming: Introduction to Econometrics with R, by Cristoph Hanck, Martin Arnold, Alexander Gerber, and Martin Schmelzer
For prediction/machine learning: An Introduction to Statistical Learning, by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani
For causal inference: Causal Inference: The Mixtape, by Scott Cunningham
Additional R References:
There are tons of free R resources available online. Here are some that seem particularly useful to me.
Manageable Introduction: Introduction to R and RStudio, by Stephanie Spielman
Full length book: Introduction to Data Science: Data Analysis and Prediction Algorithms with R, by Rafael Irizarry (this is way more than you will need for this course, but I suggest checking out Chapters 1, 2, 3, and 5, and there’s plenty more that you might find interesting).
Full length book: STAT 545: Data Wrangling, exploration, and analysis with R, by Jenny Bryan