Pages: [1]
Author Topic: Persistance in the R environment  (Read 652 times)
Full Member
Posts: 177

« on: November 06, 2013, 03:28:50 PM »

Hi RM Support

I have a RM process that invokes a R script deep within its iterative structures, thousands of times.

The R script first defines a number of lengthy functions, which it then proceeds to use. Unfortunately this means that the same functions are defined/loaded again and again, for each call to the Execute R Script operator, resulting in substantial overhead, I presume.

I would much prefer to define the functions once (in a separate R script), in a way that allows their existence to persist so that they can be called from subsequent executions of the iterated R script operator.

Is this possible, or does each Execute R Script operator necessarily start and end with a cleared environment?

Marius Helf
Hero Member
Posts: 1810

« Reply #1 on: November 11, 2013, 02:59:35 PM »

Hi Isak,

you can output arbitrary objects from the Execute Script (R) operator and use them as input for other R operators.Thus you could create your functions once and pass them to the operators using them.
If you have any questions related to this please post them here.

Best regards,

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
Please click here before posting.
Pages: [1]
Jump to: