The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Convert to and from msgpack objects in R using the official msgpack-c API through Rcpp.
A flowchart describing the conversion
of R objects into msgpack objects and back.
Msgpack EXT types are converted to raw vectors with EXT attributes containing the extension type. The extension type must be an integer from 0 to 127.
Maps are converted to data.frames with additional class “map”. Map
objects in R contain key and value list columns and can be simplified to
named lists or named vectors. The helper function
msgpack_map creates map objects that can be serialized into
msgpack.
For more information on msgpack types, see here.
Install.packages("RcppMsgPack")See tests/tests.r for more examples.
library(RcppMsgPack)
library(microbenchmark)
x <- 1:1e6
microbenchmark(xpk <- msgpack_pack(x), times=3)## Unit: milliseconds
## expr min lq mean median uq max
## xpk <- msgpack_pack(x) 6.766978 7.021575 7.478079 7.276173 7.833629 8.391085
## neval
## 3
## Unit: milliseconds
## expr min lq mean median uq max
## xu <- msgpack_unpack(xpk) 22.30772 23.53247 86.5361 24.75721 118.6503 212.5434
## neval
## 3
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.