You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slow="73d79edf8ff8c55163e90631072192301056e336", # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/8397dc3c993b61a07a81c786ca68c22bc589befc)
278
278
Fast="8397dc3c993b61a07a81c786ca68c22bc589befc"), # Commit in the PR (https://github.com/Rdatatable/data.table/pull/7019/commits) that removes inefficiency
279
279
280
+
"isoweek improved in #7144"=atime::atime_test(
281
+
setup= {
282
+
set.seed(349)
283
+
x= sample(Sys.Date() -0:5000, N, replace=TRUE)
284
+
},
285
+
expr=data.table::isoweek(x),
286
+
Slow="548410d23dd74b625e8ea9aeb1a5d2e9dddd2927", # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/548410d23dd74b625e8ea9aeb1a5d2e9dddd2927)
287
+
Fast="c0b32a60466bed0e63420ec105bc75c34590865e"), # Commit in the PR (https://github.com/Rdatatable/data.table/pull/7144/commits) that uses a much faster implementation
origListNames=if (missing(.named)) names(x) elseNULL# as.data.table called directly, not from inside data.table() which provides .named, #3854
135
138
empty_atomic=FALSE
139
+
140
+
# Handle keep.rownames for vectors (mimicking data.frame behavior)
141
+
rownames_=NULL
142
+
check_rownames=!isFALSE(keep.rownames)
143
+
136
144
for (iin seq_len(n)) {
137
145
xi=x[[i]]
138
146
if (is.null(xi)) next# eachncol already initialized to 0 by integer() above
147
+
if (check_rownames&& is.null(rownames_)) {
148
+
if (is.null(dim(xi))) {
149
+
if (!is.null(nm<- names(xi))) {
150
+
rownames_=nm
151
+
x[[i]] = unname(xi)
152
+
}
153
+
} else {
154
+
if (!is.null(nm<- rownames(xi))) {
155
+
rownames_=nm
156
+
}
157
+
}
158
+
}
139
159
if (!is.null(dim(xi)) &&missing.check.names) check.names=TRUE
140
160
if ("POSIXlt" %chin% class(xi)) {
141
161
warningf("POSIXlt column type detected and converted to POSIXct. We do not recommend use of POSIXlt at all because it uses 40 bytes to store one date.")
isTRUE(ns$.datatable.aware) ||# As of Sep 2018: RCAS, caretEnsemble, dtplyr, rstanarm, rbokeh, CEMiTool, rqdatatable, RImmPort, BPRMeth, rlist
64
74
tryCatch("data.table" %chin% get(".Depends",paste("package",nsname,sep=":"),inherits=FALSE),error=function(e)FALSE) # both ns$.Depends and get(.Depends,ns) are not sufficient
0 commit comments