Skip to content

Commit

Permalink
Remove exported [.data.table (#6002)
Browse files Browse the repository at this point in the history
* Remove exported [.data.table

* disable related tests

* delete commented code

* cautious NEWS item
  • Loading branch information
MichaelChirico authored Jul 29, 2024
1 parent 1a84514 commit 7bc46a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export(substitute2)
#export(DT) # mtcars |> DT(i,j,by) #4872 #5472

S3method("[", data.table)
export("[.data.table") # so that functional DT() finds it; PR#5176
S3method("[<-", data.table)
# S3method("[[", data.table)
# S3method("[[<-", data.table)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# data.table [v1.15.99](https://github.com/Rdatatable/data.table/milestone/30) (in development)

## BREAKING CHANGE

1. `` `[.data.table` `` is un-exported again. This was exported to support an experimental feature (`DT()` functional form of `[`) that never made it to release, but we forgot to claw back this export in the NAMESPACE; sorry about that. We didn't find anyone calling the method directly (which is inadvisable to begin with).

## NEW FEATURES

1. `print.data.table()` shows empty (`NULL`) list column entries as `[NULL]` for emphasis. Previously they would just print nothing (same as for empty string). Part of [#4198](https://github.com/Rdatatable/data.table/issues/4198). Thanks @sritchie73 for the proposal and fix.
Expand Down
2 changes: 1 addition & 1 deletion inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -17660,7 +17660,7 @@ for (col in c("a","b","c")) {
}

# DT() functional form, #4872 #5106 #5107 #5129
if (base::getRversion() >= "4.1.0") {
if (FALSE) {
DT = DTfun
# we have to EVAL "|>" here too otherwise this tests.Rraw file won't parse in R<4.1.0
droprn = function(df) { rownames(df)=NULL; df } # TODO: could retain rownames where droprn is currently used below
Expand Down

0 comments on commit 7bc46a9

Please sign in to comment.