Memory discrepencies between R workspace and on disk for same object -


i can't find information , not sure other keywords google, apologies if duplicate.

i have some lists of data.tables in workspace, displayed here:

> lsos()                           type     size prettysize rows columns all_subsets            list 46673512    44.5 mb    3      na glm_macro.part_1       list 15817064    15.1 mb    2      na glm_macro.part_2       list 15817064    15.1 mb    2      na glm_macro.part_3       list 15289864    14.6 mb    2      na 

i need save last 3 items in list disk. using save() , .rdaextension, e.g.

save(glm_macro.part_1, file = "glm_macro.part_1.rda") 

looking on disk, however, size of 3 respective files 270.7, 268.8 , 262.6 mb. ~18 times larger.

is there known reason this?

my hunch way data.table uses referencing, meaning data not copied, rather referenced original data set. see here example of how works. when save data disk, maybe forces copying of data.tables, referencing doing enough within r workspace.

terminal, rstudio , ess (emacs) show same sizes in workspace, not related environment seems.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -