Bluemix DashDB サービスで R スクリプト機能を使用しています。プロットを生成し、dashdb コンソール (Bluemix ダッシュボードから起動) でデータを視覚化できます。この R スクリプトを呼び出して結果を使用する外部コードを作成するにはどうすればよいでしょうか。
サービスは NodeRED アプリケーションにバインドされています。「http」ノードを使用してリクエストを処理し、基礎となる dashdb サービスで R スクリプトを呼び出し、結果のプロットを結果として提供するフローを何らかの方法で作成することは素晴らしいことです。出来ますか?
dashdb Web コンソール/ダッシュボードを使用する以外に R スクリプトを実行する方法はありますか? ありがとう
===
2015/10/06 更新。これは、R を呼び出すために使用しているフローです (フロー エディターに関するその他のコメントを参照してください)。
[{"id":"e5480246.1ab8","type":"http in","name":"","url":"/rscript","method":"post","swaggerDoc":"","x":196,"y":541,"z":"c33d2d18.3cc2d","wires":[["e260a1e9.1d9f6"]]},{"id":"c0252e68.3fdad","type":"http response","name":"","x":848,"y":537,"z":"c33d2d18.3cc2d","wires":[]},{"id":"e260a1e9.1d9f6","type":"function","name":"","func":"msg.payload = \"cmd=RScriptRunScript&command=\"+msg.payload+\"&fileName=&profileName=BLUDB&userid=<YOUR_USER_HERE>\";\nmsg.headers = {\"content-type\": \"application/x-www-form-urlencoded\"};\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":538,"z":"c33d2d18.3cc2d","wires":[["3842660d.c7bd9a"]]},{"id":"3842660d.c7bd9a","type":"http request","name":"R Script","method":"POST","ret":"txt","url":"<YOUR_URL_HERE>:8443/console/blushiftservices/BluShiftHttp.do","x":632,"y":536,"z":"c33d2d18.3cc2d","wires":[["c0252e68.3fdad"]]},{"id":"34a821fc.cb57de","type":"comment","name":"Instructions","info":"\nGet your Connect Info from the DashDB Console (under Connect > Connection Information).\n\nYou'll have to put your USER ID it in the \"function\" node and also configure the \"http request\" node to use Basic Auth and enter your credentials there.\nAlso, make sure your URL is right according to the info presented on the DashDB Console.","x":529,"y":665,"z":"c33d2d18.3cc2d","wires":[]},{"id":"253f405e.dac0c","type":"inject","name":"","topic":"","payload":"","payloadType":"none","repeat":"","crontab":"","once":false,"x":213,"y":610,"z":"c33d2d18.3cc2d","wires":[["ba5fe664.45a018"]]},{"id":"68e07153.971f9","type":"http request","name":"R Script","method":"POST","ret":"txt","url":"<YOUR_URL_HERE>:8443/console/blushiftservices/BluShiftHttp.do","x":637,"y":615,"z":"c33d2d18.3cc2d","wires":[["2b62647.fd49d9c"]]},{"id":"2b62647.fd49d9c","type":"debug","name":"","active":true,"console":"false","complete":"false","x":848,"y":615,"z":"c33d2d18.3cc2d","wires":[]},{"id":"ba5fe664.45a018","type":"function","name":"","func":"msg.payload = \"cmd=RScriptRunScript&command=numbers <- c(4, 23, 15, 12, 43, 54, 34, 23, 65, 87)\\nsortedNumbers = sort(numbers)\\nprint(sortedNumbers)\\n&fileName=&profileName=BLUDB&userid=<YOUR_USER_HERE>\";\nmsg.headers = {\"content-type\": \"application/x-www-form-urlencoded\"};\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":419,"y":615,"z":"c33d2d18.3cc2d","wires":[["68e07153.971f9"]]}]