nathan-russell/hashmap

How to save/load the hashmap object

ys08 opened this issue · 2 comments

ys08 commented
  1. I used saveRDS function to save hashmap object
  2. But got these errors when operating on the hashmap object loaded by readRDS function
    Error in .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: (nil)>, : NULL value passed as symbol address

Thanks.

Yes unfortunately you will not be able to do this directly with saveRDS / readRDS because the object created by hashmap is a bit more complicated than native R objects. However, I'm pretty sure it is possible to provide equivalent functionality by serializing / deserializing the underlying C++ object. I'll look into it and see what I can come up with.

ys08 commented

Glad to hear that the problem is solvable. How about compressing the serialization of the C++ object like saveRDS.