当前位置: 首页>>代码示例>>Java>>正文


Java RConsoleOutputStream类代码示例

本文整理汇总了Java中org.rosuda.JRI.RConsoleOutputStream的典型用法代码示例。如果您正苦于以下问题:Java RConsoleOutputStream类的具体用法?Java RConsoleOutputStream怎么用?Java RConsoleOutputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RConsoleOutputStream类属于org.rosuda.JRI包,在下文中一共展示了RConsoleOutputStream类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.rosuda.JRI.RConsoleOutputStream; //导入依赖的package包/类
public static void main(String[] args) {
      System.out.println("Press <Enter> to continue (time to attach the debugger if necessary)");
      try { System.in.read(); } catch(Exception e) {};
      System.out.println("Creating Rengine (with arguments)");
Rengine re=new Rengine(args, true, new TextConsole2());
      System.out.println("Rengine created, waiting for R");
      if (!re.waitForR()) {
          System.out.println("Cannot load R");
          return;
      }
System.out.println("re-routing stdout/err into R console");
System.setOut(new PrintStream(new RConsoleOutputStream(re, 0)));
System.setErr(new PrintStream(new RConsoleOutputStream(re, 1)));

System.out.println("Letting go; use main loop from now on");
  }
 
开发者ID:starqiu,项目名称:RDMP1,代码行数:17,代码来源:rtest2.java

示例2: main

import org.rosuda.JRI.RConsoleOutputStream; //导入依赖的package包/类
public static void main(String[] args) {
  	
  	args = new String[1];
  	args[0] = "--vanilla";
  	
      System.out.println("Press <Enter> to continue (time to attach the debugger if necessary)");
      try { System.in.read(); } catch(Exception e) {};
      System.out.println("Creating Rengine (with arguments)");
Rengine re=new Rengine(args, true, new TextConsole2());
      System.out.println("Rengine created, waiting for R");
      if (!re.waitForR()) {
          System.out.println("Cannot load R");
          return;
      }
System.out.println("re-routing stdout/err into R console");
System.setOut(new PrintStream(new RConsoleOutputStream(re, 0)));
System.setErr(new PrintStream(new RConsoleOutputStream(re, 1)));

System.out.println("Letting go; use main loop from now on");
  }
 
开发者ID:fauconnier,项目名称:LaToe,代码行数:21,代码来源:rtest2.java


注:本文中的org.rosuda.JRI.RConsoleOutputStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。