Displaying 1 result from an estimated 1 matches for "testfillc".
Did you mean:
testfill
2005 Dec 13
1
correct C function usage
...-snip-
ab = double(length(a) + length(b) - 1))$ab
void testFill(int *values, int *newvalues, int* endposition ){
newvalues[0] = 1;
newvalues[1] = 2;
*endposition = 2;
}
dyn.load("../testFill.so")
testTestFill <- function(){
tempfilled <- testFillC( c(30:40))
realfilled <- tempfilled$newvalues[1:tempfilled$endposition]
return(realfilled)
}
testFillC <- function(a){
.C("testFill", as.integer(a), newvalues=integer(length(a)),
endposition=integer(1))
}
Thank you very much in advance
Ido Tamir