Skip to content

Commit 8624ba1

Browse files
committed
Merge branch 'issue5829' of https://github.com/venom1204/data.table into issue5829
2 parents 5f7f5ff + 6c8dd59 commit 8624ba1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/data.table.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ replace_dot_alias = function(e) {
316316
warningf("nomatch isn't relevant together with :=, ignoring nomatch")
317317
nomatch=NULL
318318
}
319+
if (length(jsub) >= 3L && is.function(jsub[[3L]])) {
320+
stopf("the right hand side of := should be a vector, list, data.frame, function or call, not a function,to store a function wrap it in a list: DT[, newcol := list(myfun)]")
321+
}
319322
}
320323
}
321324

0 commit comments

Comments
 (0)