Error Calling Serialize R Function

R programming : Calling a R program I receive an error while using the png() function

By default, commandArgs returns the name and path of the R executable.
It thus appears in the error message /usr/lib/R/bin/exec/R.
This can be avoided via commandArgs(trailingOnly = TRUE).

I tested it in RStudio:

commandArgs()
# [1] "RStudio" "--interactive"

commandArgs(trailingOnly = TRUE)
# character(0)

So the solution would be to use this line to get the png file name:

a = commandArgs(trailingOnly = TRUE)

Getting 'too much recursion' error when trying to serialize Qooxdoo-Object

One of your objects must have a property or similar which refers to an object which has already been serialised - there's nothing wrong with using qx.util.Serializer, but if you give it an object which has recursive references you will get a recursion error.

You can use the Qooxdoo Playground (http://www.qooxdoo.org/devel/playground/) to create an example of your problem so that others can help diagnose you problem; when you can reproduce it, use the "Shorten URL" button to create a tinyurl link.

Here's a working example of qx.util.Serializer, you can copy & paste it into the playground (SO wont let me use tinyurls :( )

qx.Class.define("abc.MyClass", {
extend: qx.core.Object,

properties: {
alpha: {
init: null,
nullable: true
}
}
});

var my = new abc.MyClass();
my.set({ alpha: 1 });
this.debug(qx.util.Serializer.toJson(my));

/* ******************************
* Show the log by clicking the "Log" button in the toolbar to see the output
*/


Related Topics



Leave a reply



Submit