My dataframe has approx. 1,200,000 rows and 60 columns. The size of .RData file created for the same dataframe with the above code in is different in Windows and Linux. While in Windows, the size of file is approx. 229 MB, in Linux it is 2 GB.
What is the potential reason for this? Is there any workaround for me to reduce the size of files in Linux?
On both systems does object.size( my_data_frame ) return approximately the same value?
Tidyverse also has object_size() from the pryr package that might return a different result as it has additional considerations, but for simple data frames I would expect it to be the same as the object.size result.
Content
Run a digest on the columns of the data set under both systems. Are they the same?
Are the digests the same before and after round trip?
After you round trip the data (serialize to disk and read back to R), is the data the same on both systems? Re-run object.size and digest as above. Do the values match the before & after on the same system? Do they match between the systems?