root / tmp / org.txm.core / src / groovy / org / txm / test / HelloWorldR.groovy @ 306
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 |
|
37 |
// TODO: Auto-generated Javadoc
|
38 |
/* (non-Javadoc)
|
39 |
* @see groovy.lang.Script#run()
|
40 |
*/
|
41 |
def r = RWorkspace.getRWorkspaceInstance() // get the R connection |
42 |
|
43 |
r.setLog(true) // start R logging |
44 |
|
45 |
r.eval("print(\"Hello World!\")") // do it |
46 |
|
47 |
r.setLog(false) // stop R log |