msgpack_map: 'MsgPack' Map

Description Usage Arguments Value Examples

View source: R/functions.r

Description

A helper function to create a map object for input to 'MsgPack'.

Usage

1
2
3
msgpack_map(key, value)

msgpackMap(key, value)

Arguments

key

A list or vector of keys (coerced to list). Duplicate keys are fine (connects to std::multimap in C++).

value

A list or vector of values (coerced to list). This should be the same length as key.

Value

An data.frame also of class "map" that can be used as input to msgpack_pack.

Examples

1
2
3
x <- msgpack_map(key=letters[1:10], value=1:10)
x_packed <- msgpack_pack(x)
x_unpacked <- msgpack_unpack(x_packed)

RcppMsgPack documentation built on May 7, 2018, 1:03 a.m.