【发布时间】:2015-10-29 16:42:36
【问题描述】:
如何使用 openCPU JavaScript API 或 jQuery 将自定义(以字符串形式)R 函数添加到 openCPU(作为本地服务器运行)库?
使用类似的东西
var myfunc = "ff <- function(x,y) { x+y }";
$.post("http://localhost:8483/R/call/base/identity/save",
{x : myfunc},
function(res) {...});
在浏览器中产生以下错误
Cross-Origin Request Blocked: The Same Origin Policy disallows
reading the remote resource at http://localhost:8483/R/call
/base/identity/save. (Reason: CORS header 'Access-Control-Allow-
Origin' missing)
【问题讨论】:
标签: javascript jquery r opencpu