Part II. Bilingualism I: Learning a New Language
In this part, I’ll introduce the two core languages for data science: Python and R. In contrast to other introductions, I expect some familiarity in one language before introducing the other. In short, I expect that you’re carrying baggage. I’d like to advise you to leave your baggage at the door, but baggage is designed to be hauled around, so that’s kind of hard to do. Instead, let’s embrace your baggage! Recognize that Python and R operate quite differently and you may not always find a 1:1 translation. That’s OK!
When I teach R and Python for complete beginners, each lesson is an element, a fundamental component of the whole. The first four elements are:
- Functions
-
How to perform actions, i.e., the verbs.
- Objects
-
How to store information, i.e., the nouns.
- Logical Expressions
-
How to ask questions.
- Indexing
-
How to find information.
There are many layers beyond these four elements, but these are the core, essential ones. Once you have a good grasp of these elements, you have the tools to delve further on your own. My goal is to get you to that point. Thus, the following chapters are not thorough introductions to each language.
The Appendix contains a quick-reference Python:R bilingual dictionary. It will help you translate code you’re familiar with into your new, still unfamiliar language.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access