Skip to content

Commit

Permalink
add PR number now that's known
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdowle committed Oct 11, 2021
1 parent 125d404 commit 0ef4c72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ replace_dot_alias = function(e) {
.unsafe.opt() #3585
missingnomatch = missing(nomatch)
nomatch0 = identical(nomatch,0) || identical(nomatch,0L) || identical(nomatch, FALSE) # for warning with row-numbers in i; #4353
if (nomatch0) nomatch=NULL # retain nomatch=0|FALSE backwards compatibility, #857 #XXXX
if (nomatch0) nomatch=NULL # retain nomatch=0|FALSE backwards compatibility, #857 #5214
if (!(is.null(nomatch) || (length(nomatch)==1L && is.na(nomatch)))) stopf("nomatch= must be either NA or NULL (or 0 for backwards compatibility which is the same as NULL but please use NULL)")
if (!is.logical(which) || length(which)>1L) stopf("which= must be a logical vector length 1. Either FALSE, TRUE or NA.")
if ((isTRUE(which)||is.na(which)) && !missing(j)) stopf("which==%s (meaning return row numbers) but j is also supplied. Either you need row numbers or the result of j, but only one type of result can be returned.", which)
Expand Down
2 changes: 1 addition & 1 deletion inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -18271,7 +18271,7 @@ DT = data.table(A=1:3)
class(DT) = "data.table"
test(2222, print(DT), output="A.*3")

# retain nomatch=FALSE backwards compatibility
# retain nomatch=FALSE backwards compatibility, #5214
DT = data.table(A=1:3, key="A")
test(2223, DT[.(4), nomatch=FALSE], data.table(A=integer(), key="A"))

0 comments on commit 0ef4c72

Please sign in to comment.