Breaking the Barrier: Running Python Code under R

There are many similarities between R language and Python in fields such as data analysis and machine learning, and in some application scenarios, it is inevitable to involve mutual calls between the two. Here is a brief introduction to using the recursive library to perform R calls to Python.

1. Open Rstudio

Create a new R markdown file.

2. Install the retail library

If the installation fails and prompts an issue with Rtools, install the Rtools package.

3. Result display

As can be seen from the above code, Python code can already be run in R.

Related articles