rcpp-gallery
rcpp-gallery copied to clipboard
sorting article has a failing stopifnot expression
@rbresearch I just made a change to the Gallery which causes articles to fail if they stop with an error. After doing this I noticed that the following expression from your sorting article was failing it's test
# check that the nth sorted elements of the vectors are equal
stopifnot(all.equal(stl_nth_element(x, 43)[43], sort(x, partial=43)[43]))
I temporarily removed the code so that the Gallery would build: https://github.com/jjallaire/rcpp-gallery/commit/f3de01337dd59f1ccbe3dec53ccbdaf28aa5fcd2
However it seems worth pursuing why the test is failing (it may have never worked in the first place but the error was just printed and we never noticed it).