Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
lesson_20 [2020/02/11 10:51]
argemiro
lesson_20 [2022/12/31 21:20]
admin [Selecting the R Interpreter to Use]
Line 1: Line 1:
 {{ :​logo_logo.png?​400 |}} {{ :​logo_logo.png?​400 |}}
 \\ \\
-=====LESSON 20: Dinamica EGO and R Coupling=====  ​+=====Dinamica EGO and R Coupling=====  ​
 \\ \\
 \\ \\
  
 ==== What will you learn? ==== ==== What will you learn? ====
-  * Couple ​the R to Dinamica EGO+  * Couple R to Dinamica EGO
   * Calculate R Expression   * Calculate R Expression
   * Select the R Interpreter to Use   * Select the R Interpreter to Use
Line 17: Line 17:
 ===== Exchanging Data between R and Dinamica ===== ===== Exchanging Data between R and Dinamica =====
  
-Dinamica EGO 4 changes the game when it comes to exchanging data with R. Now Dinamica can use a specialized set of functors to send and receive data to and from R. R can use an special package (called "​[[:​external_communication|Dinamica]]"​) to send and receive data to and from Dinamica. This allows both tools to run simultaneously ​and none of them needs be in charge ​of controlling the simulation. Those specialized functors and package functions not only take care of data exchange between both tools, but also ensure that the calls are kept synchronized by blocking a receiver when the corresponding ​data is not yet available or the sender has not yet finished ​baking ​all the information.+Dinamica EGO 4 changes the game when it comes to exchanging data with R. Now Dinamica can use a specialized set of functors to send and receive data to and from R. R can use an special package (called "​[[:​external_communication|Dinamica]]"​) to send and receive data to and from Dinamica. This allows both tools to run simultaneously ​without the need of one controlling the simulation. Those specialized functors and package functions not only take care of data exchange between both tools, but also ensure that the calls are kept synchronized by blocking a receiver when the shared ​data are not yet available or the sender has not yet finished ​processing ​all the information.
  
 {{ :​rcoupling4.png?​600 |}} {{ :​rcoupling4.png?​600 |}}
Line 57: Line 57:
 {{ :​rcoupling10.png?​600 |}} {{ :​rcoupling10.png?​600 |}}
  
-<​note>​Some very simple examples showing how to use an R script as part of a Dinamica EGO model are provided as part of the dataset distributed with the Dinamica EGO application. Check the content of ''​Dataset\Examples\various_applications\calculate r expression''​.</​note>​+<​note>​Some very simple examples showing how to use an R script as part of a Dinamica EGO model are provided as part of the dataset distributed with the Dinamica EGO application. Check the content of ''​\Guidebook_Dinamica_5\Models\calculate_r_expression''​.</​note>​
  
 ==== Selecting the R Interpreter to Use ==== ==== Selecting the R Interpreter to Use ====
Line 65: Line 65:
 {{ :​rcoupling11.png?​600 |}} {{ :​rcoupling11.png?​600 |}}
  
-Any R interpreter can be used as an alternative (and external) R installation provided that a compatible [[https://​cran.r-project.org/​bin/​windows/​Rtools/​|RTools]] and the [[:​external_communication|"​Dinamica"​]] package are installed. The biggest advantage of using a alternative version of R is that the user will be free to install and import any packages he wants. When using the default R interpreter from the [[:​plugins_4|Enhancement Plugin]], the user is limited to the packages that come pre-installed with the platform+Any R interpreter can be used as an alternative (and external) R installation provided that a compatible [[https://​cran.r-project.org/​bin/​windows/​Rtools/​|RTools]] and the [[:​external_communication|"​Dinamica"​]] package are installed. The biggest advantage of using a alternative version of R is that the user will be free to install and import any packages he wants.
  
 For more information about how to set an external R interpreter,​ see the documentation about the [[:​Calculate R Expression]] and [[:external communication]]. For more information about how to set an external R interpreter,​ see the documentation about the [[:​Calculate R Expression]] and [[:external communication]].
Line 90: Line 90:
 \\ \\
 \\ \\
-Congratulations,​ you have successfully completed this lesson! Now let’s move to the **next lesson:​** ​[[lesson_21|LESSON 21: Dinamica EGO script language and console launcher]]+\\ 
 +[[lesson_21|Next: Dinamica EGO script language and console launcher]] 
 +\\ 
 +☞[[:​guidebook_start| Back to Guidebook Start]]