.
Then, what is the difference between data table and data frame in R?
frame is: a list of vectors of the same length, with a few extra attributes such as column names. data. table is a package maintained by Matt Dowle which aims accomplish several objectives: Allow columns to be assigned or modified by reference.
Subsequently, question is, what is the data table and what can it be used for? The purpose of data tables is to present tabular information in a grid, or matrix, and to have column or rows that show the meaning of the information in the grid.
Hereof, is data table faster than data frame?
table does a shallow copy of the data frame. Not just reading files, writing the files using data. table is much faster than write.
Why is data table so fast?
Hugely fast. This is due in part to the keys (sort columns) and to the referenced based nature of the data on the disk. Keying sorts the table on user specified columns. It does so by way of a hidden reference column (therefore the data doesn't actually move).