search for: gowsim

Displaying 2 results from an estimated 2 matches for "gowsim".

2005 Apr 26
2
Advice for calling a C function
...owever, I'm stubborn and want to know why Jari's code works and mine doesn't! Other than, of course, the obvious - one of us knows what their doing and the other doesn't. I would appreciate any help. What I've done is: pass a matrix x to my C function, as a double: .C("gowsim", as.double(mat), as.integer(nrow(mat)), as.integer(ncol(mat))) Then I try and reconstruct the matrix, in the form of a C array: #include <R.h> #include <Rmath.h> #include <math.h> void gowsim ( double *mat, int *OBJ, int *MATDESC) { double x [*MATDESC][*OBJ]; in...
2005 Apr 26
2
Advice for calling a C function
...owever, I'm stubborn and want to know why Jari's code works and mine doesn't! Other than, of course, the obvious - one of us knows what their doing and the other doesn't. I would appreciate any help. What I've done is: pass a matrix x to my C function, as a double: .C("gowsim", as.double(mat), as.integer(nrow(mat)), as.integer(ncol(mat))) Then I try and reconstruct the matrix, in the form of a C array: #include <R.h> #include <Rmath.h> #include <math.h> void gowsim ( double *mat, int *OBJ, int *MATDESC) { double x [*MATDESC][*OBJ]; in...