BlobToSObject
Convert Between S objects and Binary Objects

Description

Use these function 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") is unintelligible to Spotfire, but it 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 can be passed back from a data function to Spotfire as a "value", stored as a document property, and then passed back to another data function. For example, you can use a blob to store a fitted model later, and then pass the blob to a data function that computes predicted values based on that fitted model and the current data.
Value
SObjectToBlob returns a vector of class "raw". BlobToSObject returns an S object.
Note
The format of the blob depends on the S interpreter (open-source R, TERR, and so on) and the format can change in the future. This format is not intended to be a long-term storage format. Rather, it 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 6.1.1-7
Package Index