Comments (4)
JJ,
Thanks for the note, I'll look into it and figure out why it is failing.
Thanks,
Ross
On Tue, Feb 3, 2015 at 4:49 PM, JJ Allaire [email protected] wrote:
@rbresearch https://github.com/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
https://github.com/jjallaire/rcpp-gallery/blob/gh-pages/src/2013-01-31-sorting.cpp
was failing it's testcheck 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: f3de013
f3de013However 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).—
Reply to this email directly or view it on GitHub
#65.
from rcpp-gallery.
Pinging @rbresearch
Ross, any news on this?
from rcpp-gallery.
Hi Dirk,
Sorry for the late response. I was stumped by this at first, but now I
think I have it figured out. The first time I ran the file with the
following line, it ran fine. I ran it a second time and then it failed. I
tried several different values of n and some worked while others did not. I
do not completely understand why it worked some of the time.
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]))
There appears to be a bug in the stl_nth_element function and I made a
rookie mistake of not accounting for the 0-based indexing in C++. I tested
the fix for the vector x of different lengths and for all values of n and
the test passed for each case. I will submit a pull request shortly.
Ross
On Sun, Mar 22, 2015 at 1:27 PM, Dirk Eddelbuettel <[email protected]
wrote:
Pinging @rbresearch https://github.com/rbresearch
Ross, any news on this?
—
Reply to this email directly or view it on GitHub
#65 (comment)
.
from rcpp-gallery.
Thank you! I was out traveling but will take a look.
from rcpp-gallery.
Related Issues (20)
- Proposed new entry: Customized printer for exposed C++ classes HOT 1
- Article on RcppArrayFire? HOT 4
- Add Gallery Post on Rcpp equivalent of stop(..., call.=FALSE) HOT 2
- Doxygen documentation in R package HOT 2
- remove outdated sparse matrix examples HOT 13
- Half of an article missing HOT 5
- Add examples for DateVector and DateTimeVector to Rcpp Gallery HOT 1
- Add example to subset a vector using an index range
- Update R package requirements in "Local Development Configuration" wiki HOT 9
- gist for example with update of 2013-07-13-dmvnorm_arma.Rmd HOT 6
- Add example of data.table object creation
- A pull request for a new entry? HOT 10
- Update MathJax to v3
- trivial typo HOT 2
- Getting different results for Sample HOT 2
- Updating the `STL random_shuffle for permutations` article HOT 7
- Bug in Gerber Statistic Code HOT 3
- CSS for bullet lists HOT 4
- Rcpp::StringVector HOT 2
- Updating Armadillo Subset HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcpp-gallery.