Re: [R] Return dynamic array from C to R

2012-04-21 Thread Prof Brian Ripley
On 22/04/2012 04:52, Jaimin Dave wrote: Hi Everyone, I am new to R and I am trying to return array(dynamic) from C to R. But when I print array(vector) in R it gives NA as output. When I print array in C it gives correct o/p but some how it is not returned to R. *Code in C:* void test(double *ve

[R] Return dynamic array from C to R

2012-04-21 Thread Jaimin Dave
Hi Everyone, I am new to R and I am trying to return array(dynamic) from C to R. But when I print array(vector) in R it gives NA as output. When I print array in C it gives correct o/p but some how it is not returned to R. *Code in C:* void test(double *vec,double *size){ vec = (double *)calloc(2