Re: [Rcpp-devel] pnorm/qnorm?

2012-09-07 Thread Dirk Eddelbuettel
On 7 September 2012 at 12:07, Rodney Sparapani wrote: | On 09/07/2012 11:53 AM, Dirk Eddelbuettel wrote: | > As a general, looking at the unit test files can be helpful. Here is one for qnorm: | > | >"runit_qnorm_prob" = list( | >signature( x = "numeric" ), | >' | >NumericVector x

Re: [Rcpp-devel] pnorm/qnorm?

2012-09-07 Thread Rodney Sparapani
On 09/07/2012 11:53 AM, Dirk Eddelbuettel wrote: As a general, looking at the unit test files can be helpful. Here is one for qnorm: "runit_qnorm_prob" = list( signature( x = "numeric" ), ' NumericVector xx(x) ; return List::create(_["lower"] = qnorm( xx, 0.0, 1.0 ),

Re: [Rcpp-devel] pnorm/qnorm?

2012-09-07 Thread Dirk Eddelbuettel
On 7 September 2012 at 10:51, Rodney Sparapani wrote: | There must be something that I am totally missing with respect to | pnorm/qnorm. Is there a more clever way to write | Rcpp::stats::qnorm_0(x, 1, 0) or Rcpp::stats::pnorm_0(x, 1, 0)? | Have I over-looked some docs for these? I've been using

[Rcpp-devel] pnorm/qnorm?

2012-09-07 Thread Rodney Sparapani
There must be something that I am totally missing with respect to pnorm/qnorm. Is there a more clever way to write Rcpp::stats::qnorm_0(x, 1, 0) or Rcpp::stats::pnorm_0(x, 1, 0)? Have I over-looked some docs for these? I've been using Rcpp heavily for the last month and really enjoying it! -- R

Re: [Rcpp-devel] using Rcpp function Module twice triggers segfault

2012-09-07 Thread Dirk Eddelbuettel
On 7 September 2012 at 06:40, Dirk Eddelbuettel wrote: | | On 6 September 2012 at 23:51, Jiqiang Guo wrote: | | | | | | On Thu, Sep 6, 2012 at 11:43 PM, Dirk Eddelbuettel wrote: | | | | | | On 6 September 2012 at 21:24, Jiqiang Guo wrote: | | | Dear List, | | | | | | In the m

Re: [Rcpp-devel] Filling a list with iterator, or setting names from CharacterVector/SEXP?

2012-09-07 Thread Dirk Eddelbuettel
On 7 September 2012 at 01:32, Christian Gunning wrote: | > | Can I use as() and then iterate over the CharacterVector? | > | > Sure, works via Rcpp::as< std::vector< std::string> >(foo) | | Perfect, thanks. Revised example included below for reference. | | > I am not sure what it is that you

Re: [Rcpp-devel] using Rcpp function Module twice triggers segfault

2012-09-07 Thread Dirk Eddelbuettel
On 6 September 2012 at 23:51, Jiqiang Guo wrote: | | | On Thu, Sep 6, 2012 at 11:43 PM, Dirk Eddelbuettel wrote: | | | On 6 September 2012 at 21:24, Jiqiang Guo wrote: | | Dear List, | | | | In the middle of figure out another problem, I used function Module | twice, but |

Re: [Rcpp-devel] Filling a list with iterator, or setting names from CharacterVector/SEXP?

2012-09-07 Thread Christian Gunning
> | Can I use as() and then iterate over the CharacterVector? > > Sure, works via Rcpp::as< std::vector< std::string> >(foo) Perfect, thanks. Revised example included below for reference. > I am not sure what it is that you want but if you look e.g. at RcppExamples > and its examples related t