The sequencer is a flowchart which represents each step of the app. A sequencer begins with a
Start step, which is unique in the sequence.
The application then simply follows the arrows and executes each step.
Each step corresponds to a file to execute or a condition. It can be:
- an (.R), which executes an R file ;
- a (.py), which executes a Python file ;
- a (.pgui), which displays a GUI ;
- a (.pseq), which makes the app to continue inside another sequence ;
- a , which contains a R or Python expression, and follows the bottom arrow if the condition is true or the right arrow otherwise ;
- an which terminates the app.
If there is no output to a step, it ends the app, however it is a good practice to add an
Adding a step
There is two ways to add a step. The first one, which is recommended to avoid errors, is to simply drag and drop the file from the File explorer of the project in RCode, to the sequencer.
In the screenshot above we add the file
dashboard.pgui to the sequencer with a drag and drop.
Another way to add an element is with right clicking anywhere on the sequencer:
An End step can only be added through a right click.
In this case, the step is empty and does not point to a file to execute (if relevant). A left click on the step shows its parameters:
- ID is an ID, used in some PGM functions that require a
- Name is the name of the step displayed at the execution on the right of RPGM, if the option is not desactivated in the
- File is the file executed with the step.
A step added through a drag and drop from the file explorer has already all these field filled.
Steps can be connected to each other by pressing the left mouse button on the output circles around a step, and then dragging and dropping the appearing arrow to an input circle of another step.
The sequencer constantly checks that the sequence is correct, in particular:
- No step shares the same ID ;
- No step without an output (except the End step) ;
- No step points to a non existing file.
If errors are detected, they are reported on the top left. A left click shows more details, and the corresponding errors are outlined in red in the sequencer.