Hello Tom.
Yes, my fault. We can delete the double ampersand. :) Of course I was
sleeping.
And below the snippet to use a json object returned by R using YUI.
Mission accomplished.
<script type="text/javascript">
YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.XHR_JSON = new function() {
var myColumnDefs = [
{key:"a", label:"Col1"},
{key:"b", label:"Col2"},
{key:"c", label:"Col3"}
];
this.myDataSource = new YAHOO.util.DataSource("http://
127.0.0.1:8079/R_process.pl?");
this.myDataSource.connMethodPost = true;
this.myDataSource.responseType =
YAHOO.util.DataSource.TYPE_JSON;
this.myDataSource.responseSchema = {
fields: ["a","b","c"]
};
var args = encodeURIComponent("json(c(a=1, b=5, c=10))");
var postData = "command=R_commands&R_commands=" + args;
this.myDataTable = new YAHOO.widget.DataTable("json",
myColumnDefs, this.myDataSource,
{ caption:"",
draggableColumns:true,
selectionMode:"single",
initialRequest: postData
});
};
});
</script>
On Apr 8, 2:35 pm, "Short, Tom" <
TSh...@epri.com> wrote:
> I don't know why you need the double ampersand. Likely a bug.
>
> Tom Short
> Electric Power Research Institute (EPRI)
>
Thanks Tom for your beautiful package.
Regards,
Alberto