I have created a data.table
(similar to data.frame
-- see comments below) object which is approximately equal to 11MB (I found it's size using the object.size()
function).
When I save this file to the disk using the save()
function the resulting file has size equal to 736KB.
(1) How can this be?
(2) Is it possible to achieve this small size using manually the
write.bin()
function?
The data.table has 121,328 rows and 13 columns. The data type of the columns are
- Date (2 columns)
- Character (5 columns)
- Integer (3 columns)
- Numeric (3 columns)
The first five rows of the data.table
are the following
date time QTind OPRAseqNum OEC OCC Bid BidSize Ask AskSize type expiration strike
1: 2005-01-03 09:30:24 Q 94698 C 707.2 1 710.2 1 C 2006-06-17 500
2: 2005-01-03 09:30:24 Q 94946 C 707.2 1 710.2 1 C 2006-06-17 500
3: 2005-01-03 09:30:24 Q 94948 C 707.0 1 710.0 1 C 2006-06-17 500
4: 2005-01-03 09:30:24 Q 94950 C 707.0 1 710.0 1 C 2006-06-17 500
5: 2005-01-03 09:30:26 Q 98083 C 707.2 1 710.2 1 C 2006-06-17 500