在@ScriptManager 运行的 R 文件中使用 Renjin 包

问题描述

我正在尝试在使用 scriptService.run 执行的 R 脚本中使用 csvreadggplot,但出现以下错误

org.renjin.eval.EvalException: Could not load package org.renjin.cran:csvread; tried org.renjin.cran:csvread,org.renjin.bioconductor:org.renjin.cran:csvread,org.renjin.cran:org.renjin.cran:csvread

Java 代码相当简单:

scriptService.run(plotgeneration_file,true);

在 R 中,我按如下方式加载库:

library('org.renjin.cran:csvread')

尝试使用 library('csvread') 直接加载它同样失败。

我正在 pom.xml 中加载适当的依赖项:

<dependencies>
        <dependency>
            <groupId>net.imagej</groupId>
            <artifactId>imagej</artifactId>
        </dependency>
        <dependency>
            <groupId>org.renjin.cran</groupId>
            <artifactId>ggplot2</artifactId>
            <version>3.2.0-b8</version>
        </dependency>
        <dependency>
            <groupId>org.renjin.cran</groupId>
            <artifactId>csvread</artifactId>
            <version>1.2.1-b1</version>
        </dependency>
    </dependencies>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)