serialize | R Documentation |
An extension of R native serialization using the 'refhook' system for custom serialization and unserialization of non-system reference objects.
serialize(x, hook = NULL)
unserialize(x, hook = NULL)
x |
an object. |
hook |
[default NULL] optionally, a configuration returned by
|
For serialize: a raw vector. For unserialize: the unserialized object.
vec <- serialize(data.frame())
vec
unserialize(vec)
obj <- list(arrow::as_arrow_table(iris), arrow::as_arrow_table(mtcars))
cfg <- serial_config(
"ArrowTabular",
arrow::write_to_raw,
function(x) arrow::read_ipc_stream(x, as_data_frame = FALSE)
)
raw <- serialize(obj, cfg)
unserialize(raw, cfg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.