[Rcpp-devel] How to pf from Rcpp

Dirk Eddelbuettel edd at debian.org
Sun Nov 13 20:08:00 CET 2011


On 12 November 2011 at 15:41, Dirk Eddelbuettel wrote:
| 'grep -r' is often my best friend -- but in this case you need to poke by hand
| 
|    include/Rcpp/stats/f.h
|    include/Rcpp/stats/nf.h
| 
| as all these contains (beside the copyright header) are a mere 
| 
|   #ifndef Rcpp__stats__f_h
|   #define Rcpp__stats__f_h
| 
|   RCPP_DPQ_3(f,::Rf_df,::Rf_pf,::Rf_qf)
| 
|   #endif
| 
| and 
| 
|   #ifndef Rcpp__stats__nf_h
|   #define Rcpp__stats__nf_h
| 
|   RCPP_DPQ_3(nf,::Rf_dnf,::Rf_pnf,::Rf_qnf)
| 
|   #endif

What I quoted there contain a minor buglet which I just fixed. Now we can
call pf() without having to set the ncp argument as it should be. I also
added two new unit tests for pf() and pnf().

Thanks to Hao for posting this here as his post triggered the work for the fix.

Dirk

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx


More information about the Rcpp-devel mailing list