【发布时间】:2016-10-19 10:52:10
【问题描述】:
我正在尝试在 opencpu 服务器中显示由 R 函数绘制的图形。 但是,它只在 html 页面中显示 [object Object]。以下是我的 AngularJS 控制器中的代码。
var req = ocpu.rpc("plotGraph", {
filepath:"C:/Users/abc/Desktop/test.txt"
}, function(output){
$("#output").text(output);
});
以下是plotGraph包中的R函数。
plotGraph <- function(filepath) {
test.ecg <- read.table(filepath, quote="\"", comment.char="")
ecg=ts(test.ecg)
plot(ecg)
}
如何显示由 R 函数创建的绘图?
【问题讨论】:
标签: javascript jquery angularjs r opencpu