search for: wrapcheckstr

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

2009 Aug 28
1
Calling C funtion from R help Needed
...s issue Thank you in advance C function (Name : checkstr.c) #include<stdio.h> int n_char(char n,int m) { int result; result = 3; //result = strlen(n); printf("the string is %c\n",n); printf("the silly number is %d\n",m); return result; } Wrapper Code (wrapcheckstr.c) #include <stdio.h> #include<string.h> int n_char(char ,int ); void checkstr_R_wrapper(char *n,int *m, int *result) { *result = n_char(*n,*m); } R code (checkstr.c) checkstr <- function(n,m) { if (!is.loaded(symbol.C('checkstr_R_wrapper'))) { dyn.load('checkstr.so...