search for: new_number

Displaying 1 result from an estimated 1 matches for "new_number".

2007 Apr 24
1
Problem with length of array while calling C from R
Hello, my problem is that I don't know how long must be an array of double while calling C from R. R-Code: > array <- c(1,1,1) > save <- .C ( "Ctest" , a = array ) C-Code: void Ctest ( double *array ) { ... array = (double*) realloc ( array , new_number * sizeof(double) ) ; ... } The length of "array" will be compute in C. At the end save$a has a length of 3 and not the length of the allocated array in C. What can I do? Thank you in advance. Sven Kn?ppel