Table of Contents

Goal

Run an R script inside KadiStudio.

Important note: The R script already contains the path where output files are saved.

Prerequisites

Final Workflow

The figure below shows the final layout of the workflow.

final_workflow_run-script_example_02

R Script

The image below shows the contents of the Python script used in this tutorial.

r_script_exam2

The R script already contains the path where output files are saved.

Creating and Filling out

1- [Node 1] - Add a workflow-nodes misc run-script Node

record_get_file

2- Add and fill out Source Text Nodes (Variables)

  • How:

    • In the workspace, right-click and select Add Source → String (2, 3).

3_text_nodes

  • Node 2 : File path of the script. (Mandatory)
  • Node 3 : Interpreter (Mandatory, Rscript is designed to execute R scripts non-interactively).

Connection

  • Pay attention to the ports colors.
    • Strings (light green)

Running

1- Save the workflow by pushing Play button.

running_1.png

2- Start running the workflow by using Start button.

running_2

3- Status: Finished

final_status_4

4- The file is stored at the specified path.

Results

The figure below shows the results. results_run-script_examp2

Done.