msgpack_simplify: Simplify 'MsgPack'

View source: R/functions.r

msgpack_simplifyR Documentation

Simplify 'MsgPack'

Description

A helper function for simplifying a 'MsgPack' return object.

Usage

msgpack_simplify(x)

msgpackSimplify(x)

Arguments

x

Return object from msgpack_unpack.

Value

A simplified return object from msgpack_unpack. Lists of all the same type are concatenated into an atomic vector. Maps are simplified to named lists or named vectors as appropriate. NULLs are converted to NAs if simplified to vector.

Examples

x <- msgpack_format(1:10)
x_packed <- msgpack_pack(x)
x_unpacked <- msgpack_unpack(x_packed)
x_simplified <- msgpack_simplify(x_unpacked)

eddelbuettel/rcppmsgpack documentation built on March 27, 2024, 12:17 p.m.