Run second R script from parent script

I have about 5 scenarios that are part of a project that runs one after another. I would like to open the first script, run it, and then ask at the end: "Do you want to run XrefGenetic.r?" If so, then XrefGenetic.r should open and start. I am 100% sure that R can do this, in fact I think I knew how, but forgot and can not find it anywhere.

How do I open another r script from r script?

+4
source share
1 answer

Are you thinking about source() ?

My usual recommendation is to create a package, because it fixes all these problems: the functions and symbols are known (or hidden if you decide not to export them), and in general you have much better control.

+5
source

Source: https://habr.com/ru/post/1347641/


All Articles