Displaying 2 results from an estimated 2 matches for "openfvs".
Did you mean:
opencvs
2002 Oct 08
1
dyn.load and c-function
...dll and have been able to call it from R. The
function is :
void __stdcall testfunc2(
unsigned long *a,
double *b,
unsigned long *c,
double *result )
{
*result = 0;
*result = (*a) * (*b) * (*c);
}
and the R code to call the function is as follows:
dyn.load("c:/openfvs/biometrics/debug/biometrics.dll" )
tf2 <- function( a, b, c, d )
.C("testfunc2",
as.integer(a),
as.double(b),
as.integer(c),
as.double(d) )
I'm having a little trouble getting the value out of the R function. I would
like to be able to call the R funcion...
2003 May 20
1
building a Win32 DLL with R objects?
...xb = NUMERIC_POINTER( b );
xab = NUMERIC_POINTER( ab );
UNPROTECT( 3 );
return ab;
}
I built the dll using the "rcmd shlib main.c" and a dll pops out in the end.
Yeah for me! Now, I tried to call my function using:
## this is a simple r program to demonstrate how to
## call openfvs functions....
dyn.load("c:/rdll_test/main.dll" )
x <- c( 1, 2.3568, 3.14159 )
y <- c( -568.89234, 4, 3234.23424 )
conv <- function( a, b ) .Call( "test_function", a, b )
and I'm not sure the DLL actually getting loaded? I've been able to step
through other DLL...