Use Python with R with reticulate : : CHEAT SHEET
The reticulate package lets you use Python and R together seamlessly in R code, in R Markdown documents, and in the RStudio IDE.
The reticulate package lets you use Python and R together seamlessly in R code, in R Markdown documents, and in the RStudio IDE.