The sequencer is a flowchart which represents each step of the application. A sequencer begins with a
Start step, which is unique. 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 (.pgui), which displays a GUI ;
- a (.pseq), which makes the application to continue inside another sequence ;
TRUE, the right arrow otherwise ;
, which contains a R expression, and follows the bottom arrow if
- an which terminates the application.
If there is no output to a step, it ends the application, however it is a good practice to add an End step.
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 RPGM 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 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 checks that the sequence is correct, in particular:
- No step shares the same ID ;
- No step without an output (except the End) ;
- 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.