A simple way to call R from Python

R. Jin
1 min readMay 27, 2020

Prerequisites:

I have Python 3, R, RStudio, Rtools installed.

Add corresponding bin directory of Python 3, R, Rtools to you PATH variable under environment variable.

After installation and environment variable edit, write the following Python script to call R script.

Here we go.

Just run python script via your Command Prompt/Terminal to call your R script. No need to edit anything in the R script.

Hopefully this simple way also works for you.

If so, your applause would be appreciated.

--

--

R. Jin

世界が终わるまでは… #watchman@CSUF#R&D #VR/AR #ML #randomblogging #solutionsharing #opinionsonmyown