1useDynLib(datatable, .registration=TRUE)
2
3## For S4-ization
4import(methods)
5exportClasses(data.table, IDate, ITime)
6##
7
8export(data.table, tables, setkey, setkeyv, key, "key<-", haskey, CJ, SJ, copy)
9export(setindex, setindexv, indices)
10export(as.data.table,is.data.table,test.data.table)
11export(last,first,like,"%like%","%ilike%","%flike%",between,"%between%",inrange,"%inrange%")
12export(timetaken)
13export(truelength, setalloccol, alloc.col, ":=")
14export(setattr, setnames, setcolorder, set, setDT, setDF)
15export(setorder, setorderv)
16export(setNumericRounding, getNumericRounding)
17export(chmatch, "%chin%", chorder, chgroup)
18export(rbindlist)
19export(fifelse)
20export(fcase)
21export(fread)
22export(fwrite)
23export(foverlaps)
24export(shift)
25export(transpose)
26export(tstrsplit)
27export(frank)
28export(frankv)
29export(address)
30export(.SD,.N,.I,.GRP,.NGRP,.BY,.EACHI)
31export(rleid)
32export(rleidv)
33export(rowid)
34export(rowidv)
35export(uniqueN)
36export(setDTthreads, getDTthreads)
37# set operators
38export(fintersect)
39export(fsetdiff)
40export(funion)
41export(fsetequal)
42S3method(all.equal, data.table)
43export(shouldPrint)
44export(fsort)  # experimental parallel sort for vector type double only, currently
45# grouping sets
46export(groupingsets)
47export(cube)
48export(rollup)
49S3method(groupingsets, data.table)
50S3method(cube, data.table)
51S3method(rollup, data.table)
52export(frollmean)
53export(frollsum)
54export(frollapply)
55export(nafill)
56export(setnafill)
57export(.Last.updated)
58export(fcoalesce)
59
60S3method("[", data.table)
61S3method("[<-", data.table)
62# S3method("[[", data.table)
63# S3method("[[<-", data.table)
64S3method("$<-", data.table)
65S3method(print, data.table)
66S3method(as.data.table, data.table)
67S3method(as.data.table, data.frame)
68S3method(as.data.table, array)
69S3method(as.data.table, matrix)
70S3method(as.data.table, list)
71S3method(as.data.table, integer)
72S3method(as.data.table, numeric)
73S3method(as.data.table, character)
74S3method(as.data.table, logical)
75S3method(as.data.table, factor)
76S3method(as.data.table, ordered)
77S3method(as.data.table, Date)
78S3method(as.data.table, ITime)
79S3method(as.data.table, table)
80S3method(as.data.table, default)
81S3method(as.data.frame, data.table)
82S3method(as.list, data.table)
83S3method(as.matrix, data.table)
84if (getRversion() >= "4.0.0") {
85  # this version number must be the same as in .onLoad
86  # fix in R in Sep 2019 (#3948) makes c|rbind S3 dispatch work; see FAQ 2.24.
87  # if we register these (new in v1.12.6) methods always though, the previous workaround no longer works in R<4.0.0. Hence only register in R>=4.0.0.
88  S3method(cbind, data.table)
89  S3method(rbind, data.table)
90}
91# else {
92#  # and if we export but don't register in R < 4.0.0 we get this note:
93#  # > Found the following apparent S3 methods exported but not registered:
94#  # > cbind.data.table rbind.data.table
95#  # in addition to errors in tests 324, 326, 414.1, 414.2, 442, 445, 451
96#  export(cbind.data.table)
97#  export(rbind.data.table)
98#  # A revdep using rbind.data.frame() directly before (which data.table changed in base) should change to rbind() generic and that should work
99#  # in all combinations of R before/after 4.0.0 and data.table before/after 1.12.6, so long as data.table is installed using the same major
100#  # version of R (and that is checked in .onLoad with error if not).
101# }
102export(.rbind.data.table) # continue to export for now because it has been exported in the past so it may be depended on
103S3method(dim, data.table)
104S3method(dimnames, data.table)
105S3method("dimnames<-", data.table)
106S3method("names<-", data.table)
107S3method(duplicated, data.table)
108S3method(unique, data.table)
109S3method(merge, data.table)
110export(merge.data.table) #2618
111S3method(subset, data.table)
112S3method(transform, data.table)
113S3method(within, data.table)
114S3method(is.na, data.table)
115S3method(format, data.table)
116S3method(Ops, data.table)
117S3method(anyDuplicated, data.table)
118S3method(split, data.table)
119
120export(dcast, melt)
121S3method(dcast, data.table)
122S3method(melt, data.table)
123
124# exported for historical reasons -- if reshape2 is higher on search path,
125# dcast(DT) will not dispatch since reshape2::dcast is not generic. So users
126# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
127export(melt.data.table, dcast.data.table)
128
129import(utils)
130S3method(update, dev.pkg)
131export(update.dev.pkg)
132S3method(tail, data.table)
133S3method(head, data.table)
134import(stats)
135S3method(na.omit, data.table)
136
137S3method(as.data.table, xts)
138if (getRversion() >= "3.6.0") {
139  export(as.xts.data.table)          # fails in R-devel if not exported too, but I don't understand why
140  S3method(xts::as.xts, data.table)  # delayed registration (new in R-devel)  -- shouldn't this also export as.xts.data.table for us?
141} else {
142  export(as.xts.data.table)          # this on some configuration happens to fail as.xts dispatch to dt method #3286
143}
144
145# IDateTime support:
146export(as.IDate,as.ITime,IDateTime)
147export(second,minute,hour,yday,wday,mday,week,isoweek,month,quarter,year)
148
149S3method("[", ITime)
150S3method("+", IDate)
151S3method("-", IDate)
152S3method(as.character, ITime)
153S3method(as.data.frame, ITime)
154S3method(as.Date, IDate)   # note that base::as.Date is masked by zoo::as.Date, #1500 #4777
155S3method(as.IDate, Date)
156S3method(as.IDate, POSIXct)
157S3method(as.IDate, default)
158S3method(as.IDate, numeric)
159S3method(as.ITime, character)
160S3method(as.ITime, default)
161S3method(as.ITime, POSIXct)
162S3method(as.ITime, numeric)
163S3method(as.ITime, POSIXlt)
164S3method(as.ITime, times)
165S3method(as.list, IDate)
166S3method(as.POSIXct, IDate)
167S3method(as.POSIXct, ITime)
168S3method(as.POSIXlt, ITime)
169S3method(c, IDate)
170S3method(c, ITime)
171S3method(cut, IDate)
172S3method(format, ITime)
173S3method(IDateTime, default)
174S3method(mean, IDate)
175S3method(mean, ITime)
176S3method(print, ITime)
177S3method(rep, IDate)
178S3method(rep, ITime)
179S3method(round, IDate)
180S3method(round, ITime)
181S3method(trunc, ITime)
182S3method(seq, IDate)
183S3method(seq, ITime)
184S3method(unique, IDate)
185S3method(unique, ITime)
186S3method('[<-', IDate)
187S3method(edit, data.table)
188
189