data.table provides a high-performance version of base R’s
data.frame with syntax and feature enhancements for ease of use, convenience and programming speed.
?fread, see also convenience features for small data
IRanges::findOverlaps), non-equi joins (i.e. joins using operators
>, >=, <, <=), aggregate on join (
by=.EACHI), update on join
install.packages("data.table") # latest development version: data.table::update.dev.pkg()
See the Installation wiki for more details.
[ operator the same way you would use
data.frame one, but…
jargument, not just list of columns
jexpression by group
library(data.table) DT = as.data.table(iris) # FROM[WHERE, SELECT, GROUP BY] # DT [i, j, by] DT[Petal.Width > 1.0, mean(Petal.Length), by = Species] # Species V1 #1: versicolor 4.362791 #2: virginica 5.552000
data.table is widely used by the R community. It is being directly used by hundreds of CRAN and Bioconductor packages, and indirectly by thousands. It is one of the top most starred R package on GitHub. If you need help, the
data.table community is active on StackOverflow.
Guidelines for filing issues / pull requests: Contribution Guidelines.