Stop On Bigdata Objects

DESCRIPTION:

This function calls stop if its main argument is a bigdata object. It is primarily called within other functions when that function will not work with bigdata objects.

USAGE:

stop.on.bdObject(x, name=deparse(substitute(x)))

REQUIRED ARGUMENTS:

x
any S-PLUS object.

OPTIONAL ARGUMENTS:

name
the name of the argument to use in the error message.

VALUE:

NULL is invisibly returned. The function is called for its side effect.

SIDE EFFECTS:

If x is a bigdata object, an error message is issued.

DETAILS:

stop.on.bdObject is typically used within other functions to check if a particular argument supplied to that function is a bigdata object. If the function does not support bigdata objects in a particular argument then calling stop.on.bdObject with that particular argument at the beginning of the function can provide a clear error message that bigdata is not allowed. This can avoid cryptic error messages from another function, several calls deep, when the bigdata object is used and it is not expected.

The call to stop is evaluated in the parent frame so that the error message includes the name of the calling function instead of stop.on.bdObject.

SEE ALSO: