Appendix. A Python:R Bilingual Dictionary

The following dictionary is meant to be used as a quick reference for translating commands between Python and R. Visit the book’s repo for access to other resources.

Corrections and additions are welcome. Please contact Rick on LinkedIn or place an issue on the repo. For a downloadable summary, please visit the book’s website.

Aside from some command-line expressions to be entered in the terminal, which are explicitly noted, expressions are in R or Python.

Package Management

Table A-1. Installing a single package
install.packages("tidyverse")
# Command line
pip install pandas
Table A-2. Installing specific package versions
devtools::install_version(
  "ggmap",
  version = "3.5.2"
  )
# Command line
pip install pandas==1.1.0
Table A-3. Installing multiple packages
install.packages(c("sf", "ggmap"))
# Command line

Get Python and R for the Modern Data Scientist now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.