admin:rui [Promethee]

Differences

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

Link to this comparison view

admin:rui [2012/02/06 14:48]
richet
admin:rui [2015/10/06 07:58] (current)
Line 1: Line 1:
 +===== [R] front-end installation guide (1.1 version) =====
 +{{tag>R Install}}
 +As a new feature of Promethee 1.1, it is now possible to **call Promethee as a [R] function**. 
  
 +This usage is highly valuable for coupling codes (like a composition of functions), testing new algorithms, or generally, using an external code (available in Promethee environment) like another R function. \\
 +The requirement to use Promethee within [R], is firstly to have **both Promethee and [R] installed on the same machine**, and then to properly install the **rJava package** in [R] (see [[http://www.rforge.net/rJava/]]).
 +
 +==== Checking the installation ====
 +
 +Once [R] is started, 
 +  * **load the promethee.R** script available in the Promethee installation directory, 
 +  * **initialize** Promethee with Promethee.init(...) function, 
 +  * then use shell functions (**Promethee.run(...)** and **Promethee.design(...)**) like another R function:<code r>
 +R version 2.14.1 (2011-12-22)
 +Copyright (C) 2011 The R Foundation for Statistical Computing
 +ISBN 3-900051-07-0
 +Platform: x86_64-pc-linux-gnu (64-bit)
 +...
 +
 +> PROMETHEE_HOME="/opt/Promethee"
 +> source(file.path(PROMETHEE_HOME,"promethee.R"))
 +> Promethee.init(PROMETHEE_HOME)
 +Loading required package: rJava
 +Java Java(TM) SE Runtime Environment
 + version 1.6.0_26
 + from path /usr/lib/jvm/java-6-sun-1.6.0.26/jre
 +Promethee 1.1-0 <build 09/01/2012 17:07>
 +Reading quota configuration
 +Initializing math. engine
 +Supported models: [... MCNP_5, ...]
 +Maximum load: 10 computers
 +Supported designs: [...]
 +> Promethee.run(model = "MCNP_5",input.files = file.path(PROMETHEE_HOME,"samples","godiva.p"),input.design = list(r=c(7.0,8.0,9.0)))
 +$mean_keff
 +[1] 0.82429 0.92694 1.02363
 +
 +$sigma_keff
 +[1] 0.00054 0.00057 0.00061
 +</code>
 +
 +More information and examples are available as comments in the **promethee.R** file. \\ It is also recommended to use the RStudio front-end environment (see [[http://www.rstudio.org]]) in order to make the most of R in desktop usage, especially when using Promethee interface.
 +
 +
 +==== FAQ ====
 +
 +{{page>:admin:rui:faq}}
© IRSN - All right reserved - Legal information