RSJava

未知
Java
跨平台
2011-06-30
bear256

Java调用R语言或S语言的接口,示例代码:

# This FALSE is important as otherwise we end up calling make twice, once in the constructor
# and once here after we have specified the super class.
gen <- .JavaConstructor("ForeignReferenceClassGenerator", "java.awt.event.ActionListener", "RActionListener", FALSE)
.Java(gen, "superClassName", "org.omegahat.R.Java.RForeignReference")
.Java(gen,"make")
.Java(gen,"write", .JavaConstructor("File", "/tmp/RActionListener.class"))


# Now load it, assuming /tmp/ is in your classpath.
.Java(NULL, 'findClass', "RActionListener")

加载中

评论(0)

暂无评论

暂无资讯

暂无问答

暂无博客

返回顶部
顶部