Re: [R] problem when I Call C subfunction in void function

2014-08-27 Thread Thomas Lumley
On Thu, Aug 28, 2014 at 3:36 AM, eguichard wrote: > Thank you. > I can improve my program with your response but I have an other problem. > > /double essai (double *Px, int *tailleP) > { > int i; > for (i = 0; i < *tailleP; i++) > { > Px[i]=Px[i]*2; >

Re: [R] problem when I Call C subfunction in void function

2014-08-27 Thread eguichard
Thank you. I can improve my program with your response but I have an other problem. /double essai (double *Px, int *tailleP) { int i; for (i = 0; i < *tailleP; i++) { Px[i]=Px[i]*2; Rprintf ("I print Px %f\t", Px[i]); } Rpri

Re: [R] problem when I Call C subfunction in void function

2014-08-27 Thread John McKown
On Wed, Aug 27, 2014 at 4:58 AM, eguichard wrote: > Hi everybody, > I am including some C code in R program using the .C interface. > I would like use a C subfunction calling by C void function. > > /double essai (double Px[], int tailleP) > { > Rprintf ("I print Px %d\t", Px[1]); >

[R] problem when I Call C subfunction in void function

2014-08-27 Thread eguichard
Hi everybody, I am including some C code in R program using the .C interface. I would like use a C subfunction calling by C void function. /double essai (double Px[], int tailleP) { Rprintf ("I print Px %d\t", Px[1]); return 57; } void test_essai (double *Px, int *tailleP, double