Pathway Analytics
  • Introduction
  • Blog
    • MMM Showdown: Google Meridian vs. PyMC Marketing
    • Drop Line Charts - Use Process Behavior Charts Instead!
    • Create a GitBook Data Science Portfolio
    • 5 Reasons I Chose Johns Hopkins Online AI Masters Program
  • Statistics
    • Google Lightweight MMM
    • Propensity Score Matching
    • Thompson Sampling
    • Basketball Free Throw Percentage App
  • Deep Learning
    • Classifying Medical Abstract Sentences
    • Predicting Bitcoin Prices
    • Food Image Classifying
  • Supervised Learning
    • Waiter Tips Multivariate Regression
    • Sleep Cycle - Analyzing My Own Sleep Data
  • Unsupervised Learning
    • Customer Segmentation using KMeans
    • Time Series Clustering
  • Dashboards, Reports, and Visualizations
    • Shiny Useful Code
    • R Markdown Reports
  • Mini Notes
    • Useful SQL Code
    • Testing Code
    • Correlation Plots
    • Docker - Jupyter Lab and R Studio Setup
    • Tensorflow GPU Setup
    • Object Oriented Programming
    • R and Python Together using Reticulate
    • Random Forests are Versatile
Powered by GitBook
On this page
  • Introduction
  • Reticulate Setup Template:
  • Strengths:
  • Weaknesses:
  • Additional Resources:
  1. Mini Notes

R and Python Together using Reticulate

PreviousObject Oriented ProgrammingNextRandom Forests are Versatile

Last updated 3 years ago

Created by Chia, Jonathan on Apr 09, 2022

Introduction

Reticulate lets you switch between Python and R in one R Markdown document

Notice that the python object flights was referenced in R using py$flights

Reticulate Setup Template:


Template.rmd

Strengths:


  1. You can code in Python and then switch to R for Shiny Dashboards

  2. You can pick and choose your favorite packages from either R or Python - ggplot vs seaborn, caret vs sklearn, etc.

  3. You can keep your R and python projects together in one place

  4. You can create beautiful R markdown reports that display both R and Python outputs

Weaknesses:


  1. Can feel a little clunky especially if you are used to Python IDE's

  2. Python objects do not show up in the R environment window - it will show up if our R server is updated to have newest RStudio

  3. You can use R in Jupyter Notebooks if you prefer Python

  4. You have to be reliant on the reticulate package to use Python

Additional Resources:

See below link for more information:

https://rstudio.github.io/reticulate/


Document generated by Confluence on Apr 09, 2022 16:54

Atlassian