Re: [Rcpp-devel] IntegerVector initialization

2012-01-12 Thread Dirk Eddelbuettel
On 13 January 2012 at 00:28, Gregor Kastner wrote: | > | This is a minor thing but caused some confusion to me: | > | | > | IntegerVector foo1(2, 4.0); // works | > | IntegerVector foo2(2, 4);// throws error | > | > What were you expecting with the second argument? A 'fill' value? | > Argu

Re: [Rcpp-devel] IntegerVector initialization

2012-01-12 Thread Gregor Kastner
> | This is a minor thing but caused some confusion to me: > | > | IntegerVector foo1(2, 4.0); // works > | IntegerVector foo2(2, 4);// throws error > > What were you expecting with the second argument? A 'fill' value? > Arguably, int should then work. Yes, inspired by // ... with a defau

Re: [Rcpp-devel] Segmentation fault in Rcpp::DataFrame::create when data is sufficiently long

2012-01-12 Thread Dirk Eddelbuettel
On 12 January 2012 at 16:00, Slava Mazur wrote: | Greetings, | | | | My R session crashes with core dump when executing the following Rcpp call: | | | | DataFrame df = Rcpp::DataFrame::create( | | Rcpp::Named("t", boost::make_iterator_range(projector_num(vb, | get_time), p

Re: [Rcpp-devel] IntegerVector initialization

2012-01-12 Thread Dirk Eddelbuettel
On 12 January 2012 at 11:29, Gregor Kastner wrote: | This is a minor thing but caused some confusion to me: | | IntegerVector foo1(2, 4.0); // works | IntegerVector foo2(2, 4);// throws error What were you expecting with the second argument? A 'fill' value? Arguably, int should then work.

[Rcpp-devel] Segmentation fault in Rcpp::DataFrame::create when data is sufficiently long

2012-01-12 Thread Slava Mazur
Greetings, My R session crashes with core dump when executing the following Rcpp call: DataFrame df = Rcpp::DataFrame::create( Rcpp::Named("t", boost::make_iterator_range(projector_num(vb, get_time), projector_num(ve, get_time))), Rcpp::Named("type", boost::make_

[Rcpp-devel] IntegerVector initialization

2012-01-12 Thread Gregor Kastner
This is a minor thing but caused some confusion to me: IntegerVector foo1(2, 4.0); // works IntegerVector foo2(2, 4);// throws error while IntegerVector bar1 = IntegerVector::create(4.0, 4.0); // works IntegerVector bar2 = IntegerVector::create(4, 4); // works Bug or feature? Best,