Data Table
Facts about data.table
.
Extends from
data.frame
and therefore should provide the same API.Is written in C and is really fast.
Much faster at subsetting, grouping and updating.
Hello world
See all data.table
tables created in memory.
Subsetting rows.
Access row on specific index.
Access rows that fulfil a condition.
Calculate values from columns
Return table of values for a column
Add new column
Multiple operations.
Plyr like operations
Grouping by
Count number of occurrences
Keys
Making table faster by setting the keys
Then we can join tables by keys.
Fast reading
First we create a file that we can use to test speed of reading.
Slow approach using read.table
function.
Faster approach using fread
function.
Last updated