fsave | R Documentation |
Saving and loading FacileAnalysisResults can be tricky because they rely on a chain of parent objects that created them, all of which have a reference to the FacileDataStore that they came from.
Currenly, the FacileDataStore is removed from every internal object when
before it is serialized via fsave()
. The FacileDataStore is then restored
to "just where it needs to be" (using strong assumptions of where it needs
to be, instead of logging where it was removed from in fsave()
) when
brought back to life via fload()
.
fsave(x, file, with_fds = FALSE, ...)
fload(x, fds = NULL, anno = NULL, with_fds = TRUE, ...)
x |
A |
file |
A path to a file to save. If filename ends with '.rds', then
object will be serialized with |
with_fds |
Serialize the FacileDataStore with the object? Default is
|
fds |
The |
An fsave_info
attribute will be attached to the serialized object before
saving which will be a list that holds information required to materialize
the analysis result successfully. Minimally this will include info about how
to reconstitute and attach the FacileDataStore that the object was generated
from.
Elements of fsave_info
list so far include:
fds_class
: A string indicating the class of the FacileDataStore that the
result x
was generated from.
fds_path
: The path on the filesystem that teh FacileDataStore can be
found. Currently we expect this to be a FacileDataSet
fds_anno_dir
: The annotation directory for the FacileDataSet
fds_add
: A descriptor that indicate which elements in the serialized
object should have the fds attached to them, besides itself.
NULL
for fsave
, the (correctly sublcassed) FacileAnalysisResult
for fload
, along with FacileDataStore
(fds
) attached
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.