

bundle
Prepare objects for serialization with a consistent interface
The bundle package provides a common interface for saving and reloading R model objects that rely on external references, such as pointers or server connections, which aren’t preserved by standard save() or saveRDS() functions. It allows you to bundle these models with their references so they can be safely transferred between R sessions and deployed in production environments.
The package solves the problem of model objects that break when saved and reloaded because they depend on information outside the object itself. Bundle works with various model types, including XGBoost, that store pointers or other external references that get disrupted during serialization. The workflow is straightforward: call bundle() before saving your model and unbundle() after loading it in a new session to restore full functionality.




