Conversation
|
Generated via commit ee44ef4 Download link for the artifact containing the test results: ↓ atime-results.zip
|
MichaelChirico
left a comment
There was a problem hiding this comment.
Looks good! I think it needs an entry in man/, probably in ?forder would be the most logical place?
Added a reference in setorder.Rd (?forder). PTAL. |
man/setorder.Rd
Outdated
| # optimised to use data.table's internal fast order | ||
| # x[order(., na.last=TRUE)] | ||
| # x[order(., decreasing=TRUE)] | ||
| # sort_by(x, ., na.last=TRUE, decreasing=FALSE) |
There was a problem hiding this comment.
CMIIW, we leave this as a comment instead of \method{sort_by}{data.table} because the method is not available in all supported R versions, is that right?
There was a problem hiding this comment.
Hello. I simply put another use case, these are provided as comments and printed verbatim (as comments) in manpages.
However now that you mention this, I clarified that those references to sort_by are only R>=4.4.0
|
Ah, unfortunately because of r-lib/covr#567 we won't get coverage of this code yet -- the coverage runner is stuck on an R version before |
MichaelChirico
left a comment
There was a problem hiding this comment.
I am still unsure if we should try something to ensure \method{sort_by}{data.table}(x, \dots) is used "properly", but anyway LGTM, thanks!!
|
I noticed {maditr} also defines https://github.com/gdemin/maditr/blob/a4df8cccfe5ca5c8a919c6b6be2eb0e238c8866b/NAMESPACE#L19 cc @gdemin I suppose that will cause breakage on release. Anyway, there the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6679 +/- ##
==========================================
- Coverage 98.64% 98.60% -0.05%
==========================================
Files 79 79
Lines 14650 14656 +6
==========================================
Hits 14452 14452
- Misses 198 204 +6 ☔ View full report in Codecov by Sentry. |
|
I've tried \method{sort_by}{data.table}(x, y, \dots) together with
\alias{sort_by.data.table} and, surprisingly, it just worked on both
R-4.2.2 and R-3.3.0. There's no need for scary-looking kludges like
\if{\Sexpr[stage=install,results=rd]{as.character(exists("sort_by",
"package:base"))}{\method{...}}. R CMD check only verifies that all
exported symbols are documented, not that all documented aliases are
exported (or even exist in the namespace).
The old versions of R do complain about missing .formula2varlist.
|
|
This PR would benefit from example of usage in NEWS file |

Proposal for #6662
sort_by.data.table()will sort using C-locale now, this is incompatible withbase::sort_by.data.frame()used on data.tables