I have an object that's created by a function. in Rstudio, the object itself is around 3GB. When I save it as an RDS, the size is ~800MB. When I use the same function but part of the pipeline process and extract that specific object from the output of the pipeline and save it, the RDS size becomes 5GB+. It seems like there are dependencies of some sort when saving the RDS. Do I need to do something specific to remove the additional meta data?
Walkthrough:
x <- Result_From_Some_Function()
saveRDS(x) ~ 800MB
x <- output_from_pipeline@result$f1
saveRDS(x) ~ 5GB+
I have an object that's created by a function. in Rstudio, the object itself is around 3GB. When I save it as an RDS, the size is ~800MB. When I use the same function but part of the pipeline process and extract that specific object from the output of the pipeline and save it, the RDS size becomes 5GB+. It seems like there are dependencies of some sort when saving the RDS. Do I need to do something specific to remove the additional meta data?
Walkthrough:
x <- Result_From_Some_Function()
saveRDS(x) ~ 800MB
x <- output_from_pipeline@result$f1
saveRDS(x) ~ 5GB+