An Introduction to Programming
with Python and R
Welcome
This is the first open edition of “An Introduction to Programming With Python and R.” This textbook was developed and published using Quarto, an open-source platform for technical and scientific writing, using R and Python. The textbook is archived through Zenodo, an academic repository for scholarly works.
This interactive textbook is designed to provide a hands-on approach to learning the foundations of Python and R programming languages. The textbook features several practical examples of source code that may be copied into script files, convenient drop-down code blocks to check solutions to problems, and helpful open source resources to help beginners learn both programming languages. A chapter is dedicated on the ChatGPT package which can be a helpful assistant for learning and using R and RStudio.
This textbook is 1) open source, 2) interactive, 3) equipped with a built-in searchable tool, and 4) easily updatable with revisions, making it more efficient and advantageous than traditional course textbooks.
Acknowledgements
Special thanks to Miranda Stapleton for her contributions to the textbook exercises and invaluable suggestions.
If you would like to cite this book:
Murray, L. (2025). An Introduction to Programming With Python and R. Zenodo. DOI: https://doi.org/10.5281/zenodo.16180805