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
Copy file name to clipboardExpand all lines: NEWS.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,16 @@
10
10
11
11
### NEW FEATURES
12
12
13
-
1. New `sort_by()` method for data.tables, [#6662](https://github.com/Rdatatable/data.table/issues/6662). It uses `forder()` to improve upon the data.frame method and also match `DT[order(...)]` behavior with respect to locale. Thanks @rikivillalba for the suggestion and PR.
13
+
1. New `sort_by()` method for data.tables, [#6662](https://github.com/Rdatatable/data.table/issues/6662). It uses `forder()` to improve upon the data.frame method and also matches `DT[order(...)]` behavior with respect to locale. Thanks @rikivillalba for the suggestion and PR.
14
+
15
+
```r
16
+
DT= data.table(a=c(1L, 2L, 1L), b=c(3L, 1L, 2L))
17
+
sort_by(DT, ~a+b)
18
+
# a b
19
+
# 1: 1 2
20
+
# 2: 1 3
21
+
# 3: 2 1
22
+
```
14
23
15
24
2.`melt()`nowsupportsusing`patterns()`with`id.vars`, [#6867](https://github.com/Rdatatable/data.table/issues/6867). Thanks to Toby Dylan Hocking for the suggestion and PR.
16
25
@@ -56,6 +65,10 @@
56
65
57
66
13.New`mergelist()`and`setmergelist()`similarlywork_ala_`Reduce()`torecursivelymergea`list`ofdata.tables, [#599](https://github.com/Rdatatable/data.table/issues/599). Different join modes (_left_, _inner_, _full_, _right_, _semi_, _anti_, and _cross_) are supported through the `how` argument; duplicate handling goes through the `mult` argument. `setmergelist()` carefully avoids copies where one is not needed, e.g. in a 1:1 left join. Thanks Patrick Nicholson for the FR (in 2013!), @jangorecki for the PR, and @MichaelChirico for extensive reviews and fine-tuning.
58
67
68
+
14.`fcoalesce()`and`setcoalesce()`gain`nan`argumenttocontrolwhether`NaN`valuesshouldbetreatedas missing (`nan=NA`, thedefault) ornon-missing (`nan=NaN`), [#4567](https://github.com/Rdatatable/data.table/issues/4567). This provides full compatibility with `nafill()` behavior. Thanks to @ethanbsmith for the feature request and @Mukulyadav2004 for the implementation.
69
+
70
+
15.Newfunction`isoyear()`hasbeenimplementedasacomplementto`isoweek()`, returningtheISO8601yearcorrespondingtoagivendate, [#7154](https://github.com/Rdatatable/data.table/issues/7154). Thanks to @ben-schwen and @MichaelChirico for the suggestion and @venom1204 for the implementation.
71
+
59
72
### BUG FIXES
60
73
61
74
1.`fread()`nolongerwarnsoncertainsystemsonR4.5.0+wherethefileownercan't be resolved, [#6918](https://github.com/Rdatatable/data.table/issues/6918). Thanks @ProfFancyPants for the report and PR.
@@ -74,7 +87,7 @@
74
87
75
88
8. A data.table with a column of class `vctrs_list_of` (from package {vctrs}) prints as expected, [#5948](https://github.com/Rdatatable/data.table/issues/5948). Before, they could be printed messily, e.g. printing every entry in a nested data.frame. Thanks @jesse-smith for the report, @DavisVaughan and @r2evans for contributing, and @MichaelChirico for the PR.
76
89
77
-
9. Fixed incorrect sorting of merges where the first column of a key is a factor with non-`sort()`-ed levels (e.g. `factor(1:2, 2:1)` and it is joined to a character column, [#5361](https://github.com/Rdatatable/data.table/issues/5361). Thanks to @gbrunick for the report and Benjamin Schwendinger for the fix.
90
+
9. Fixed incorrect sorting of merges where the first column of a key is a factor with non-`sort()`-ed levels (e.g. `factor(1:2, 2:1)` and it is joined to a character column, [#5361](https://github.com/Rdatatable/data.table/issues/5361). Thanks to @gbrunick for the report, Benjamin Schwendinger for the fix, and @MichaelChirico for a follow-up fix caught by revdep testing.
78
91
79
92
10. Spurious warnings from internal code in `cube()`, `rollup()`, and `groupingsets()` are no longer surfaced to the caller, [#6964](https://github.com/Rdatatable/data.table/issues/6964). Thanks @ferenci-tamas for the report and @venom1204 for the fix.
80
93
@@ -86,6 +99,8 @@
86
99
87
100
14. Filling columns of class Date with POSIXct (and vice versa) using `shift()` now yields a clear, informative error message specifying the class mismatch, [#5218](https://github.com/Rdatatable/data.table/issues/5218). Thanks @ashbaldry for the report and @ben-schwen for the fix.
88
101
102
+
15. `split.data.table()` output list elements retain the S3 class of the generating data.table, e.g. in `l=split(x, ...)` if `x` has class `my_class`, so will `l[[1]]` and so on, [#7105](https://github.com/Rdatatable/data.table/issues/7105). Thanks @m-muecke for the bug report and @MichaelChirico for the fix.
103
+
89
104
### NOTES
90
105
91
106
1. The following in-progress deprecations have proceeded:
@@ -109,21 +124,21 @@
109
124
110
125
6. Using a double vector in `set()`'s`i=`and/or`j=`nolongerthrowsawarningaboutpreferringinteger, [#6594](https://github.com/Rdatatable/data.table/issues/6594). While it may improve efficiency to use integer, there's no guarantee it's an improvement and the difference is likely to be minimal. The coercion will still be reported under `datatable.verbose=TRUE`. For package/production use cases, static analyzers such as `lintr::implicit_integer_linter()` can also report when numeric literals should be rewritten as integer literals.
111
126
112
-
# data.table [v1.17.8](https://github.com/Rdatatable/data.table/milestone/41) (6 July 2025)
127
+
## data.table [v1.17.8](https://github.com/Rdatatable/data.table/milestone/41) (6 July 2025)
# data.table [v1.17.6](https://github.com/Rdatatable/data.table/milestone/40) (15 June 2025)
131
+
## data.table [v1.17.6](https://github.com/Rdatatable/data.table/milestone/40) (15 June 2025)
117
132
118
133
1.Onaheavilyloadedmachine, a`forder`threadcouldtrytoperformazero-lengthcopyfromanullpointer, whichwasde-factoharmlessbutisagainsttheCstandardandwascaughtbyadditionalCRANchecks, [#7051](https://github.com/Rdatatable/data.table/issues/7051). Thanks to @helske for the report and @aitap for the PR.
119
134
120
-
# data.table [v1.17.4](https://github.com/Rdatatable/data.table/milestone/39) (25 May 2025)
135
+
## data.table [v1.17.4](https://github.com/Rdatatable/data.table/milestone/39) (25 May 2025)
7.`as.data.table()`nowproperlyhandleskeys:specifyingkeyssetsthem, omittingkeyspreservesexistingones, andsetting`key=NULL`clearsthem, [#6859](https://github.com/Rdatatable/data.table/issues/6859). Thanks @brookslogan for the report and @Mukulyadav2004 for the fix.
141
156
142
-
## NOTES
157
+
### NOTES
143
158
144
159
1.Continuedworktoremovenon-APICfunctions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/.
test(1984.26, setalloccol(`*tmp*`), error='setalloccol attempting to modify `*tmp*`')
14277
14290
DF = as.data.frame(DT)
14278
14291
test(1984.27, identical(shallow(DF), DF)) # shallow (which is not exported) works on DF from v1.14.2. identical() to force checking the selfref attribute for #5286.
14279
-
test(1984.28, split.data.table(DF), error='argument must be a data.table')
14292
+
# 1984.28 was a coverage test converted to 'nocov' of an internal_error instead
14280
14293
test(1984.29, split(DT, by='a', f='a'), error="passing 'f' argument together with 'by' is not allowed")
14281
14294
test(1984.30, split(DT), error="Either 'by' or 'f' argument must be supplied")
14282
14295
setnames(DT, '.ll.tech.split')
@@ -15060,7 +15073,7 @@ if (test_bit64) {
15060
15073
as.i64 = bit64::as.integer64
15061
15074
test(2039.01, between(1:10, as.i64(3), as.i64(6)), error="x is not integer64 but.*Please align classes")
15062
15075
test(2039.02, between(1:10, 3, as.i64(6)), error="x is not integer64 but.*Please align classes")
15063
-
test(2039.03, between(as.i64(1:3), "2", as.i64(4)), error="x is integer64 but lower and/or upper are not")
15076
+
test(2039.03, between(as.i64(1:3), "2", as.i64(4)), error="x is integer64 but lower is not.*Please align classes")
0 commit comments