Skip to content

Conversation

@jangorecki
Copy link
Member

@jangorecki jangorecki commented May 18, 2020

Closes:

To reduce number of API changes (in still internal forder[v]) I am not going to yet close this issue:

It is partially addressed by making forder compatible with base::order, but this PR does not restrict input types. Lets see what base R is planning to do about order(df) (see R-devel discussion), and in another iteration we can solve #4346 and #4214.

It also makes na.last=NA option in forder consistent to base order by removing 0's that are result from forderv(na.last=NA).

@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #4458 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4458      +/-   ##
==========================================
- Coverage   99.61%   99.59%   -0.02%     
==========================================
  Files          72       72              
  Lines       13917    13967      +50     
==========================================
+ Hits        13863    13911      +48     
- Misses         54       56       +2     
Impacted Files Coverage Δ
R/data.table.R 100.00% <100.00%> (ø)
R/setkey.R 99.51% <100.00%> (-0.49%) ⬇️
src/assign.c 99.84% <0.00%> (-0.16%) ⬇️
R/foverlaps.R 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd7609e...7791b6e. Read the comment docs.

o
if (!is.logical(decreasing) || anyNA(decreasing)) stop("'decreasing' must be logical non-NA")
if (length(decreasing)!=1L && length(decreasing)!=length(data)) stop("'decreasing' must be either length 1, or length of the variables passed to [f]order")
asc[decreasing] = -(asc[decreasing])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[.integer automatically recycle scalar decreasing

@jangorecki jangorecki removed the WIP label May 18, 2020
@jangorecki jangorecki added the WIP label May 19, 2020
@jangorecki
Copy link
Member Author

marking as WIP because it will need rebase over lazy-forder branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DT[order(.), ...] could create index on DT order could utilize existing index order optimization does not recognize all order args properly

2 participants