Our community is getting a makeover! We will be migrating to a new community that integrates more closely with our support and knowledge base tools, as well as the core Domino product, to give you a more unified experience. Existing community articles have been added to our knowledge base, which you can preview here with your community credentials: https://tickets.dominodatalab.com/hc/en-us/community/topics Watch this space for further updates and send any feedback to [email protected] with subject "Community Feedback".

Call Python and R in one scheduled Run

petter.olsson
petter.olsson Member, Moderator, Domino Posts: 78 mod

Dear Domino user,

We recently had a question pop up that asked how to use a Schedule Run to execute both a Python and an R program at the same time. This is a pretty straightforward process that I will demonstrate here. Start by opening a new Workspace in a project of your choosing. We will create three files.

a.py

# Python File A
#!/usr/bin/python
import b
import subprocess
subprocess.call (["/usr/bin/Rscript", "--vanilla", "/mnt/a.R"]) 

b.py

#!/usr/bin/python
print("hello from Python")

a.R

print("Hello from R!")

Make sure all these files exist within the same directory and then execute a.py and see the magic unfold. Hope you find this article helpful.

Have a powerful day,

Petter

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!