search for: result_v

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

Did you mean: result_r
2010 Oct 27
2
must .Call C functions return SEXP?
...don't know what, and would definitely appreciate any help. Thanks! My R code looks like this: result.1 <- vector("list" ,1e6) result.2 <- vector("list" ,1e6) .Call("my_C_function", result.1, result.2, other.input) My C code looks like this: SEXP result_v; result_v = Rf_allocVector(REALSXP, 5); SET_VECTOR_ELT(result_list_1, k1, result_v); REAL(result_v)[0] = some_number; REAL(result_v)[1] = another_number; /* Also do the same sort of thing for result_list_2. */ return(result_list_1); /* Appears to work ok. */ /* return; */ /* Se...