An extension of R native serialization using the 'refhook' system for custom serialization and unserialization of non-system reference objects.
Arguments
- x
an object.
- hook
[default NULL] optionally, a configuration returned by
serial_config
.
Examples
vec <- serialize(data.frame())
vec
#> [1] 42 0a 03 00 00 00 02 04 04 00 00 05 03 00 05 00 00 00 55 54 46 2d 38 13 03
#> [26] 00 00 00 00 00 00 02 04 00 00 01 00 00 00 09 00 04 00 05 00 00 00 6e 61 6d
#> [51] 65 73 10 00 00 00 00 00 00 00 02 04 00 00 01 00 00 00 09 00 04 00 09 00 00
#> [76] 00 72 6f 77 2e 6e 61 6d 65 73 0d 00 00 00 00 00 00 00 02 04 00 00 01 00 00
#> [101] 00 09 00 04 00 05 00 00 00 63 6c 61 73 73 10 00 00 00 01 00 00 00 09 00 04
#> [126] 00 0a 00 00 00 64 61 74 61 2e 66 72 61 6d 65 fe 00 00 00
unserialize(vec)
#> data frame with 0 columns and 0 rows