Skip to content

Commit 957e456

Browse files
committed
updated messgae
1 parent fd95415 commit 957e456

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

NEWS.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@
1010

1111
### NEW FEATURES
1212

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, and allows sorting by expressions or functions. 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 match `DT[order(...)]` behavior with respect to locale. Thanks @rikivillalba for the suggestion and PR.
14+
1415

1516
```r
1617
DT = data.table(a = c(1, 2, 1), b = c(3, 1, 2))
17-
# sort by column 'b'
18-
sort_by(DT, ~b)
18+
# sort by 'a', then 'b'
19+
sort_by(DT, ~a + b)
1920
# a b
20-
# 1: 2 1
21-
# 2: 1 2
22-
# 3: 1 3
21+
# 1: 1 2
22+
# 2: 1 3
23+
# 3: 2 1
2324
```
2425

2526
2. `melt()` now supports using `patterns()` with `id.vars`, [#6867](https://github.com/Rdatatable/data.table/issues/6867). Thanks to Toby Dylan Hocking for the suggestion and PR.

0 commit comments

Comments
 (0)