Skip to content

Sequence files

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.

Screenshot

Each step corresponds to a file to execute or a condition. It can be:

  • an R script (.R), which executes an R file;
  • a Python script (.py), which executes a Python file;
  • a GUI (.pgui), which displays a GUI;
  • a Sequence (.pseq), which makes the app to continue inside another sequence;
  • a Condition, which contains a R or Python expression, and follows the bottom arrow if the condition is true or the right arrow otherwise;
  • an End which terminates the app.

Note

If there is no output to a step, it ends the app, 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.

Screenshot

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:

Screenshot

Note

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:

Screenshot

  • ID is an ID, used in some PGM functions that require a step, see rpgm.step();
  • Name is the name of the step displayed at the execution on the right of RPGM, if the option is not desactivated in the project.ppro file;
  • File is the file executed with the step.

Tip

A step added through a drag and drop from the file explorer has already all these field filled.

Linking steps

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.

Screenshot

Errors

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.

Screenshot