From 7bc46a90d9500843fa5bdcc8b3ccec321cb8cfb0 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Mon, 29 Jul 2024 07:44:14 -0700 Subject: [PATCH] Remove exported [.data.table (#6002) * Remove exported [.data.table * disable related tests * delete commented code * cautious NEWS item --- NAMESPACE | 1 - NEWS.md | 4 ++++ inst/tests/tests.Rraw | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 829dc0800..109336c9e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/NEWS.md b/NEWS.md index 10ec47757..baa1d256d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index b90743e28..643bd6134 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -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