Hi Slava,
On 7 May 2014 at 16:17, Slava Mazur wrote:
| Hi Dirk,
|
| > Have you by chance recently updated parts of R, Rcpp, RInside, ... but not
the others?
| Apparently yes; however, it was not done by me and the person who did this is
not available at the moment.
| So, I removed Rcpp and RIn
ists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] NumericVector crashes in dataptr
Hi Slava
On 7 May 2014 at 15:06, Slava Mazur wrote:
| Hi Dirk,
|
| Thanks for the prompt attention to this issue. It does not have anything to
do with boost: the following behaves the same way:
Yes, I said the s
Hi Slava
On 7 May 2014 at 15:06, Slava Mazur wrote:
| Hi Dirk,
|
| Thanks for the prompt attention to this issue. It does not have anything to
do with boost: the following behaves the same way:
Yes, I said the same in my email. I was ready to remove it, but it has
nothing to do with it.
|
|
Hi Dirk,
Thanks for the prompt attention to this issue. It does not have anything to do
with boost: the following behaves the same way:
#include
#include
int main(int argc, char *argv[]) {
RInside Rinst(argc, argv);
const int N = 173;
double v[N];
std::fill(v, v+N, 0.0);
R
Hi Slava,
On 7 May 2014 at 12:07, Slava Mazur wrote:
| I observe a crash in NumericVector constructor with new versions of Rcpp/
| RInside: (0.11.1 and 0.2.11 respectively).
I cannot replicate that. Ubuntu 13.10; everything current.
A copy and paste session is below. I just made the size a c
Hi,
I observe a crash in NumericVector constructor with new versions of
Rcpp/RInside: (0.11.1 and 0.2.11 respectively).
Here is a test c++ code:
// dataptr_crash.cpp
//
#include
#include
#include
static boost::shared_ptr Rinst;
Hi Romain and Dirk,
Sorry I did not see Romain's earlier response. That is very helpful!
Thank you both for your prompt assistance and for developing such a useful
tool.
-James
On Friday, August 16, 2013, Dirk Eddelbuettel wrote:
>
> Hi James,
>
> On 16 August 2013 at 12:57, James Li wrote:
Hi James,
On 16 August 2013 at 12:57, James Li wrote:
| Hi Dirk,
|
| N could be anywhere between 3-10.
Eek. 10 is a lot.
| Thanks! I will definitely look into how to do those.
|
| Also, if
|
| Rcpp::NumericVector vec3 =Rcpp::NumericVector( Rcpp::Dimension(4, 5, 6));
|
| In this case, how
Hi Dirk,
N could be anywhere between 3-10.
Thanks! I will definitely look into how to do those.
Also, if
Rcpp::NumericVector vec3 =Rcpp::NumericVector( Rcpp::Dimension(4, 5, 6));
In this case, how do we access element vec3[1,2,3]?
Thanks again,
James
On Friday, August 16, 2013, Dirk Eddelbue
Le 16/08/13 17:59, James Li a écrit :
Dear Dirk and Rcpp-devel members,
Please be aware that Rcpp is a joint project and has been so for several
years now.
I am currently passing a multidimensional (N > 2) array (i.e.
array(NA, dim = rep(3,5)) ) from R via Rcpp using
"in C++:"
//[[Rcpp::e
Hi James,
On 16 August 2013 at 11:59, James Li wrote:
| Dear Dirk and Rcpp-devel members,
|
| I am currently passing a multidimensional (N > 2) array (i.e.
| array(NA, dim = rep(3,5)) ) from R via Rcpp using
How big is 'N' going to be?
| "in C++:"
|
| //[[Rcpp::export]]
| Rcpp::List check_ar
Dear Dirk and Rcpp-devel members,
I am currently passing a multidimensional (N > 2) array (i.e.
array(NA, dim = rep(3,5)) ) from R via Rcpp using
"in C++:"
//[[Rcpp::export]]
Rcpp::List check_arrayC (Rcpp::NumericVector x, Rcpp::IntegerVector modes){
//do stuff to x
return Rcpp::List::create
> Indeed, changing the sample size from 5 to 500 results in;
For completeness, I've included an iterator example, tested over a
range of sample sizes, and plotted the results with the code below.
From where I sit, it looks like the relative timings flatten out (more
or less) at 1e4.
I'm not sure
>> benchmark(fun1(), fun2(), fun3(), fun4(), order = "relative",
> replications = 1e5L)
> test replications elapsed relative user.self sys.self user.child
> sys.child
> 4 fun4() 106.161.000 6.060 NA
> NA
> 3 fun3() 106.191.005 5.91
On 25 September 2012 at 16:19, Rodney Sparapani wrote:
| Very good. Just one quick question since I have come across
| this in the documentation somewhere, but I can't seem to find
| it anymore. Can you pass optimization flags like so?
|
| f3<- cxxfunction(signature(), plugin="Rcpp", body='
|
On 09/25/2012 03:41 PM, Dirk Eddelbuettel wrote:
In the interest of constructive criticism, my version (and I must posted
essentially the same maybe ten times already on this very list):
R> f3<- cxxfunction(signature(), plugin="Rcpp", body='
+RNGScope scope;
+NumericVector rn = Rcpp::rn
Hi,
On Tue, Sep 25, 2012 at 4:41 PM, Dirk Eddelbuettel wrote:
>
> On 25 September 2012 at 13:53, Rodney Sparapani wrote:
> | You just need an explicit type conversion like so:
> |
> | funk2 <- cxxfunction(body='RNGScope scope;
> |NumericVector rn(5);
> |for (int i=0; i < 5
On 25 September 2012 at 21:08, Jeffrey Pollock wrote:
| I was interested to see if there was any real speed difference between the
| different methods suggested, and it looks like... there isn't...
Good move -- measuring is a good idea.
And yes: at the end of the days everything is just a call t
On 25 September 2012 at 13:53, Rodney Sparapani wrote:
| You just need an explicit type conversion like so:
|
| funk2 <- cxxfunction(body='RNGScope scope;
|NumericVector rn(5);
|for (int i=0; i < 5; i++) rn[i] = as(rnorm(1,0,1));
|return wrap(rn);',
|
rom:* Jonathan Olmsted [mailto:[email protected]]
> *Sent:* Tuesday, September 25, 2012 4:29 PM
> *To:* Jeffrey Pollock
>
> *Cc:* Goldfeld, Keith; [email protected]
> *Subject:* Re: [Rcpp-devel] NumericVector Double mismatch when indexing
> an array**
[mailto:[email protected]]
Sent: Tuesday, September 25, 2012 4:29 PM
To: Jeffrey Pollock
Cc: Goldfeld, Keith; [email protected]
Subject: Re: [Rcpp-devel] NumericVector Double mismatch when indexing an array
Jeff and List,
I was interested in the same fairly recently. The full shebang
teration is really my only
>> option. I won't be generating more than a few thousand records, so the
>> time shouldn't be much of a factor. Of course, in R it is painfully slow -
>> so that is why I am going the Rcpp route.
>>
>> -Original Message-
>> F
-
> so that is why I am going the Rcpp route.
>
> -Original Message-
> From: [email protected] [mailto:[email protected]] On Behalf Of Douglas
> Bates
> Sent: Tuesday, September 25, 2012 3:13 PM
> To: Rodney Sparapani
> Cc: Goldfeld, Keith; [email protected]
- so that is why I am going the
Rcpp route.
-Original Message-
From: [email protected] [mailto:[email protected]] On Behalf Of Douglas Bates
Sent: Tuesday, September 25, 2012 3:13 PM
To: Rodney Sparapani
Cc: Goldfeld, Keith; [email protected]
Subject: Re: [
On Tue, Sep 25, 2012 at 1:53 PM, Rodney Sparapani wrote:
> On 09/25/2012 01:37 PM, Goldfeld, Keith wrote:
>
>>> code<- 'Rcpp::RNGScope scope;
>>
>>
>> +Rcpp::NumericVector rn(5);
>>
>> +for (int i=0; i< 5; i++) {
>>
>> +rn(i) = rnor
Of course - that did the trick. Thanks so much.
-Original Message-
From: Rodney Sparapani [mailto:[email protected]]
Sent: Tuesday, September 25, 2012 2:53 PM
To: Goldfeld, Keith
Cc: '[email protected]'
Subject: Re: [Rcpp-devel] NumericVector Double mis
On 09/25/2012 01:37 PM, Goldfeld, Keith wrote:
code<- 'Rcpp::RNGScope scope;
+Rcpp::NumericVector rn(5);
+for (int i=0; i< 5; i++) {
+rn(i) = rnorm(1,0,1);
+}
+return Rcpp::wrap(rn);
I am a new Rcpp user, and I have been trying to do a simple exercise of
generating random numbers to put into a vector. To start off, the following
code works:
> code <- 'Rcpp::RNGScope scope;
+ Rcpp::NumericVector rn(5);
+ rn = rnorm(5,0,1);
+ return Rcpp::wrap(rn);
Le 27/04/10 23:49, Davor Cubranic a écrit :
>
> In my code, I have an Armadillo column vector v (i.e., an 'arma::vec') that I
> return as a member of a list:
>
> arma::vec v(...);
> List result = List::create(_["v"] = v);
From armadillo's documentation: http://arma.sourceforge.net/docs.h
In my code, I have an Armadillo column vector v (i.e., an 'arma::vec') that I
return as a member of a list:
arma::vec v(...);
List result = List::create(_["v"] = v);
In R, result$v becomes a matrix, so I need to call 'as.vector(v)' to turn it
into a vector. Even explicitly returning a Num
30 matches
Mail list logo