Skip to contents

All functions

as.IDate() as.Date(<IDate>) as.POSIXct(<IDate>) round(<IDate>) as.ITime() round(<ITime>) trunc(<ITime>) as.POSIXct(<ITime>) as.character(<ITime>) format(<ITime>) IDateTime() second() minute() hour() yday() wday() mday() week() isoweek() month() quarter() year() yearmon() yearqtr()
Integer based date class
SJ() CJ()
Creates a join data.table
address()
Address in RAM of a variable
all.equal(<data.table>)
Equality Test Between Two Data Tables
as.data.table() is.data.table()
Coerce to data.table
as.data.table(<xts>)
Efficient xts to as.data.table conversion
as.matrix(<data.table>)
Convert a data.table to a matrix
as.xts.data.table()
Efficient data.table to xts conversion
set()
Assignment by reference
between() `%between%` inrange() `%inrange%`
Convenience functions for range subsets.
cdatatable
data.table exported C routines
chmatch() `%chin%` chorder() chgroup()
Faster match of character vectors
fcoalesce()
Coalescing missing values
copy()
Copy an entire object
class:data.table data.table-class
S4 Definition for data.table
data.table() `[`(<data.table>)
Enhanced data.frame
datatable-optimize datatable.optimize data.table-optimize data.table.optimize gforce GForce autoindex autoindexing auto-index auto-indexing rounding
Optimisations in data.table
dcast(<data.table>)
Fast dcast for data.table
duplicated(<data.table>) unique(<data.table>) anyDuplicated(<data.table>) uniqueN()
Determine Duplicate Rows
fcase()
fcase
fdroplevels() droplevels(<data.table>)
Fast droplevels
fifelse()
Fast ifelse
foverlaps()
Fast overlap joins
frank() frankv()
Fast rank
fread()
Fast and friendly file finagler
frollmean() frollsum() frollapply()
Rolling functions
fsort()
Fast parallel sort
fwrite()
Fast CSV writer
rollup() cube() groupingsets()
Grouping Set aggregation for data tables
first() last()
First/last item of an object
.Last.updated
Number of rows affected by last update
like() `%like%` `%ilike%` `%flike%` `%plike%`
Convenience function for calling grep.
measure() measurev()
Specify measure.vars via regex or separator
melt(<data.table>)
Fast melt for data.table
merge(<data.table>)
Merge two data.tables
na.omit(<data.table>)
Remove rows with missing values on columns specified
nafill() setnafill()
Fill missing values
`%notin%`
Convenience operator for checking if an example is not in a set of elements
setDTthreads() getDTthreads()
Set or get number of threads that data.table should use
patterns()
Obtain matching indices corresponding to patterns
print(<data.table>) format_col() format_list_item()
data.table Printing Options
rbindlist()
Makes one data.table from a list of many
rleid() rleidv()
Generate run-length type group id
rowid() rowidv()
Generate unique row ids within each group
setDF()
Coerce a data.table to data.frame by reference
setDT()
Coerce lists and data.frames to data.table by reference
setNumericRounding() getNumericRounding()
Change or turn off numeric rounding
setattr() setnames()
Set attributes of objects by reference
setcolorder()
Fast column reordering of a data.table by reference
setkey() setkeyv() setindex() setindexv() key() indices() haskey()
Create key on a data.table
fintersect() fsetdiff() funion() fsetequal()
Set operations for data tables
setorder() setorderv()
Fast row reordering of a data.table by reference
shift()
Fast lead/lag for vectors and lists
shouldPrint()
For use by packages that mimic/divert auto printing e.g. IRkernel and knitr
special-symbols datatable-symbols .SD .I .GRP .BY .N .EACHI .NGRP
Special symbols
split(<data.table>)
Split data.table into chunks in a list
subset(<data.table>)
Subsetting data.tables
substitute2()
Substitute expression
tables()
Display 'data.table' metadata
test()
Test assertions for equality, exceptions and console output
test.data.table()
Runs a set of tests.
timetaken()
Pretty print of time taken
transpose()
Efficient transpose of list
truelength() setalloccol() alloc.col()
Over-allocation access
tstrsplit()
strsplit and transpose the resulting list efficiently
update_dev_pkg()
Perform update of development version of a package