【发布时间】:2016-11-02 12:37:08
【问题描述】:
我目前正在使用 opencpu 来托管我的 R 包。但它没有显示图表。我得到 pdf、svg 和 pdf 链接,如果我点击其中任何一个,就会显示图表。但是,在控制台中我有这个错误“invalid graphics state In call:replayPlot(x)”。
以下是我的 R 函数。
plotGraph <- function(filename) {
filepath<-system.file("extdata", filename, package="demp")
sample<-read.csv(filepath,header=FALSE)
ecg=sample[2]
graph<-plot.ts(ecg)
}
以下是我的 angularjs 代码。
$scope.getData= function(filename){
filename=$scope.selectedFile+".csv";
var req=$("#output").rplot("plotGraph", {
filename:filename
});
}
还有网页中的div:
<div id="output"></div>
【问题讨论】:
标签: javascript angularjs r opencpu