Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / test / HelloWorldR.groovy @ 479

History | View | Annotate | Download (1.3 kB)

1
package org.txm.test;
2

    
3
/**
4
 * 
5
Main.
6
 *
7
 * @param args the args
8
 */
9
// Copyright © 2010-2013 ENS de Lyon.
10
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
11
// Lyon 2, University of Franche-Comté, University of Nice
12
// Sophia Antipolis, University of Paris 3.
13
// 
14
// The TXM platform is free software: you can redistribute it
15
// and/or modify it under the terms of the GNU General Public
16
// License as published by the Free Software Foundation,
17
// either version 2 of the License, or (at your option) any
18
// later version.
19
// 
20
// The TXM platform is distributed in the hope that it will be
21
// useful, but WITHOUT ANY WARRANTY; without even the implied
22
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
23
// PURPOSE. See the GNU General Public License for more
24
// details.
25
// 
26
// You should have received a copy of the GNU General
27
// Public License along with the TXM platform. If not, see
28
// http://www.gnu.org/licenses.
29
// 
30
// 
31
// 
32
// $LastChangedDate:$
33
// $LastChangedRevision:$
34
// $LastChangedBy:$ 
35
//
36
import org.txm.statsengine.r.core.RWorkspace
37

    
38
// TODO: Auto-generated Javadoc
39
/* (non-Javadoc)
40
 * @see groovy.lang.Script#run()
41
 */
42
def r = RWorkspace.getRWorkspaceInstance()         // get the R connection
43

    
44
r.setLog(true)                                                                // start R logging
45

    
46
r.eval("print(\"Hello World!\")")                        // do it
47

    
48
r.setLog(false)                                                         // stop R log