Skip to content

Commit 48281d5

Browse files
more resolution
1 parent 0fb58b5 commit 48281d5

File tree

4 files changed

+0
-155
lines changed

4 files changed

+0
-155
lines changed

R/data.table.R

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,43 +1770,7 @@ replace_dot_alias = function(e) {
17701770
GForce = FALSE
17711771
} else {
17721772
# Apply GForce
1773-
<<<<<<< HEAD
1774-
.gforce_ok = function(q) { # TODO: move outside and test directly
1775-
if (dotN(q)) return(TRUE) # #334
1776-
# run GForce for gfuns(x, ...) where x is a column of .SD
1777-
# is.symbol() is for #1369, #1974 and #2949
1778-
if (!(is.call(q) && is.symbol(q1<-q[[1L]]) && is.symbol(q2<-q[[2L]]) && q1 %chin% gfuns)) return(FALSE)
1779-
if (!q2 %chin% names(SDenv$.SDall) && q2!=".I") return(FALSE) # 875
1780-
if (q1=="weighted.mean") return(TRUE) #3977; the weight argument can be a symbol
1781-
if (length(q)==2L) return(TRUE) # e.g. sum(colA) (i.e. no arguments)
1782-
# establish named arguments; e.g. if both na.rm and n have been passed to first/last, either one could appear first
1783-
f = get(q1) # maybe a lookup table would be faster than get() but speed should be insignificant here up-front one-time
1784-
if (!is.primitive(f)) q = match.call(f, q)
1785-
# else the gfuns which are primitive functions (which match.call doesn't support and errors) are
1786-
# all of the form fun(..., na.rm=FALSE) so the na.rm arg has to be named in full by the user and
1787-
# so will be named in q already
1788-
for (argnum in seq.int(3L, length(q))) {
1789-
arg = if (is.null(names(q))) "" else names(q)[argnum]
1790-
if (arg=="na.rm") next
1791-
if (q1=="shift") {
1792-
if (arg=="fill" && (is.symbol(q$fill) || is.atomic(q$fill))) next
1793-
if (arg=="type" && (is.symbol(q$type) || is.atomic(q$type))) next # test 2224.01
1794-
if (arg=="n") next # negative n is supported by optimized shift, and in test 2224.01 n=-1 appears as a call to '-'()
1795-
}
1796-
if (arg=="n") {
1797-
if (!is.atomic(q$n) || !isTRUE(q$n>0L)) return(FALSE) # n<=0 not optimized for first/last, [, [[
1798-
next
1799-
}
1800-
if (arg!="") return(FALSE) # e.g. trim= and fill's give.names= are not yet optimized
1801-
if (length(q[[argnum]])!=1L || !is.atomic(q[[argnum]])) return(FALSE) # test 173.1: DT[,B[B>3],by=A], and test 823: sum(b,a)
1802-
if (q1=="[[" && !eval(call('is.atomic', q2), envir=x)) return(FALSE) # test 1581.16: dt[, .(l=l[[1L]]), by=a]
1803-
}
1804-
TRUE
1805-
}
1806-
if (jsub[[1L]]=="list") {
1807-
=======
18081773
if (jsub %iscall% "list") {
1809-
>>>>>>> master
18101774
GForce = TRUE
18111775
for (ii in seq.int(from=2L, length.out=length(jsub)-1L)) {
18121776
if (!.gforce_ok(jsub[[ii]], SDenv$.SDall)) {GForce = FALSE; break}
@@ -1897,12 +1861,9 @@ replace_dot_alias = function(e) {
18971861
assign(".N", len__, thisEnv) # For #334
18981862
#fix for #1683
18991863
if (use.I) assign(".I", seq_len(nrow(x)), thisEnv)
1900-
<<<<<<< HEAD
19011864
ans = gforce(thisEnv, jsub, o__, f__, len__, irows, # irows needed for #971
19021865
.Call(CsubsetVector, groups, grpcols), # just a list() subset to make C level neater; doesn't copy column contents
19031866
lhs) # for now this just prevents := with new feature first/last n>1; in future see TODO below
1904-
=======
1905-
ans = gforce(thisEnv, jsub, o__, f__, len__, irows) # irows needed for #971.
19061867
gi = if (length(o__)) o__[f__] else f__
19071868
g = lapply(grpcols, function(i) .Call(CsubsetVector, groups[[i]], gi)) # use CsubsetVector instead of [ to preserve attributes #5567
19081869

@@ -1943,7 +1904,6 @@ replace_dot_alias = function(e) {
19431904
}
19441905
}
19451906
ans = c(g, ans)
1946-
>>>>>>> master
19471907
} else {
19481908
ans = .Call(Cdogroups, x, xcols, groups, grpcols, jiscols, xjiscols, grporder, o__, f__, len__, jsub, SDenv, cols, newnames, !missing(on), verbose, showProgress)
19491909
}
@@ -3059,13 +3019,8 @@ gfuns = c(gdtfuns,
30593019
`g[` = `g[[` = function(x, n) .Call(Cgnthvalue, x, as.integer(n)) # n is of length=1 here.
30603020
ghead = function(x, n) .Call(Cghead, x, as.integer(n))
30613021
gtail = function(x, n) .Call(Cgtail, x, as.integer(n))
3062-
<<<<<<< HEAD
30633022
gfirst = function(x, n=1L, na.rm=FALSE) .Call(Cgfirst, x, as.integer(n), na.rm)
30643023
glast = function(x, n=1L, na.rm=FALSE) .Call(Cglast, x, as.integer(n), na.rm)
3065-
=======
3066-
gfirst = function(x) .Call(Cgfirst, x)
3067-
glast = function(x) .Call(Cglast, x)
3068-
>>>>>>> master
30693024
gsum = function(x, na.rm=FALSE) .Call(Cgsum, x, na.rm)
30703025
gmean = function(x, na.rm=FALSE) .Call(Cgmean, x, na.rm)
30713026
gweighted.mean = function(x, w, ..., na.rm=FALSE) {

R/test.data.table.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,6 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
435435
}
436436
assign("prevtest", num, parent.frame(), inherits=TRUE)
437437
}
438-
<<<<<<< HEAD
439-
if (length(output) || length(notOutput)) {
440-
=======
441438
if (!fail) for (type in c("warning","error","message")) {
442439
observed = actual[[type]]
443440
expected = get(type)
@@ -471,7 +468,6 @@ test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,no
471468
# nocov end
472469
}
473470
if (!fail && !length(error) && (length(output) || length(notOutput))) {
474-
>>>>>>> master
475471
if (out[length(out)] == "NULL") out = out[-length(out)]
476472
out = paste(out, collapse="\n")
477473
output = paste(output, collapse="\n") # so that output= can be either a \n separated string, or a vector of strings.

src/data.table.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,11 @@ extern SEXP sym_index;
102102
extern SEXP sym_BY;
103103
extern SEXP sym_starts, char_starts;
104104
extern SEXP sym_maxgrpn;
105-
<<<<<<< HEAD
106105
extern SEXP sym_gforce_dynamic;
107-
=======
108106
extern SEXP sym_anyna;
109107
extern SEXP sym_anyinfnan;
110108
extern SEXP sym_anynotascii;
111109
extern SEXP sym_anynotutf8;
112-
>>>>>>> master
113110
extern SEXP sym_colClassesAs;
114111
extern SEXP sym_verbose;
115112
extern SEXP SelfRefSymbol;

src/init.c

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ SEXP sym_index;
2929
SEXP sym_BY;
3030
SEXP sym_starts, char_starts;
3131
SEXP sym_maxgrpn;
32-
<<<<<<< HEAD
3332
SEXP sym_gforce_dynamic;
34-
=======
3533
SEXP sym_anyna;
3634
SEXP sym_anyinfnan;
3735
SEXP sym_anynotascii;
3836
SEXP sym_anynotutf8;
39-
>>>>>>> master
4037
SEXP sym_colClassesAs;
4138
SEXP sym_verbose;
4239
SEXP SelfRefSymbol;
@@ -52,103 +49,6 @@ Rcomplex NA_CPLX;
5249
size_t __sizes[100];
5350
size_t __typeorder[100];
5451

55-
<<<<<<< HEAD
56-
// .Calls
57-
SEXP setattrib();
58-
SEXP bmerge();
59-
SEXP assign();
60-
SEXP dogroups();
61-
SEXP copy();
62-
SEXP shallowwrapper();
63-
SEXP alloccolwrapper();
64-
SEXP selfrefokwrapper();
65-
SEXP truelength();
66-
SEXP settruelength();
67-
SEXP setcharvec();
68-
SEXP setcolorder();
69-
SEXP chmatch_R();
70-
SEXP chmatchdup_R();
71-
SEXP chin_R();
72-
SEXP fifelseR();
73-
SEXP fcaseR();
74-
SEXP freadR();
75-
SEXP fwriteR();
76-
SEXP reorder();
77-
SEXP rbindlist();
78-
SEXP vecseq();
79-
SEXP setlistelt();
80-
SEXP address();
81-
SEXP expandAltRep();
82-
SEXP fmelt();
83-
SEXP fcast();
84-
SEXP uniqlist();
85-
SEXP uniqlengths();
86-
SEXP forder();
87-
SEXP issorted();
88-
SEXP gforce();
89-
SEXP gsum();
90-
SEXP gmean();
91-
SEXP gmin();
92-
SEXP gmax();
93-
SEXP isOrderedSubset();
94-
SEXP setNumericRounding();
95-
SEXP getNumericRounding();
96-
SEXP binary();
97-
SEXP subsetDT();
98-
SEXP subsetVector();
99-
SEXP convertNegAndZeroIdx();
100-
SEXP frank();
101-
SEXP dt_na();
102-
SEXP lookup();
103-
SEXP overlaps();
104-
SEXP whichwrapper();
105-
SEXP shift();
106-
SEXP transpose();
107-
SEXP anyNA();
108-
SEXP isReallyReal();
109-
SEXP setlevels();
110-
SEXP rleid();
111-
SEXP gmedian();
112-
SEXP gtail();
113-
SEXP ghead();
114-
SEXP glast();
115-
SEXP gfirst();
116-
SEXP gnthvalue();
117-
SEXP dim();
118-
SEXP gvar();
119-
SEXP gsd();
120-
SEXP gprod();
121-
SEXP gshift();
122-
SEXP nestedid();
123-
SEXP setDTthreads();
124-
SEXP getDTthreads_R();
125-
SEXP nqRecreateIndices();
126-
SEXP fsort();
127-
SEXP inrange();
128-
SEXP between();
129-
SEXP hasOpenMP();
130-
SEXP uniqueNlogical();
131-
SEXP frollfunR();
132-
SEXP dllVersion();
133-
SEXP nafillR();
134-
SEXP colnamesInt();
135-
SEXP initLastUpdated();
136-
SEXP cj();
137-
SEXP lock();
138-
SEXP unlock();
139-
SEXP islockedR();
140-
SEXP allNAR();
141-
SEXP test_dt_win_snprintf();
142-
SEXP dt_zlib_version();
143-
SEXP startsWithAny();
144-
SEXP convertDate();
145-
SEXP notchin();
146-
147-
// .Externals
148-
SEXP fastmean();
149-
150-
=======
151-
>>>>>>> master
15252
static const
15353
R_CallMethodDef callMethods[] = {
15454
{"Csetattrib", (DL_FUNC) &setattrib, -1},
@@ -386,14 +286,11 @@ void attribute_visible R_init_data_table(DllInfo *info)
386286
sym_index = install("index");
387287
sym_BY = install(".BY");
388288
sym_maxgrpn = install("maxgrpn");
389-
<<<<<<< HEAD
390289
sym_gforce_dynamic = install("gforce_dynamic");
391-
=======
392290
sym_anyna = install("anyna");
393291
sym_anyinfnan = install("anyinfnan");
394292
sym_anynotascii = install("anynotascii");
395293
sym_anynotutf8 = install("anynotutf8");
396-
>>>>>>> master
397294
sym_colClassesAs = install("colClassesAs");
398295
sym_verbose = install("datatable.verbose");
399296
SelfRefSymbol = install(".internal.selfref");

0 commit comments

Comments
 (0)