BlobToSObject
Convert Between S objects and Binary Objects

Description

These functions allow one to pass any S object to Spotfire to be stored as a property and to convert those properties back to an S object. The binary object ("blob") will be unintelligible to Spotfire but is useful for caching information needed in a future call to a data function.

Usage

BlobToSObject(blob)
SObjectToBlob(object)

Arguments

object any S object.
blob a binary object created by SObjectToBlob.

Details

A blob created by SObjectToBlob may be passed back from a data function to Spotfire as a "value", stored as a document property, then passed back to another data function. E.g., you may use a blob to store a fitted model later pass the blob to a data function that computes predicted values based on that fitted model and the current data.
Value
a vector of class "raw".
Note
The format of the blob depends on the S interpreter (R, S+, etc.) and the format may change in the future. This is not intended to be a long-term storage format, but is for communication between data functions.
Examples
fittedModel <- lm(ozone ~ radiation + temperature + wind, data=Sdatasets::air)
blob <- SObjectToBlob(fittedModel)
# Perhaps send blob back to Spotfire as a document property
# and later make it an input parameter to a data function.
z <- BlobToSObject(blob)
identical(fittedModel, z)
Package SpotfireUtils version 4.0.0-28
Package Index