Save R object without unnecessary namespace references

Hi everybody!

This might seem to be a beginner's question to some of you but I did not find an answer which is working for me. I store several objets in RStudio with saveRDS and loaded them with readRDS. it came to my attention that after loading them with readRDS, many new libraries were visible in sessionInfo()$loadedOnly (loaded via a namespace (and not attached)). I really don't want that and it is very annoying.

How can I prevent this? I do not see any parameter I can set to avoid any namespace references to be stored with my rds file.

Any help is really appreciated! Thx, Chris

It might be that the kind of object you are saving requires those libraries. I know this is true for spatial data. Without the spatial libraries R doesn't know how to store the data. So the libraries are required.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.