search for: new_unsigned_integ

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

Did you mean: new_unsigned_integer
2006 May 08
1
Calling C++ code fom R --How to export C++ "unsigned" integer to R?
...o the following in C++: int Some_INTEGER = 5; int *p_myInt; SEXP myInt; PROTECT(myInt=NEW_INTEGER(1)); myInt[0] = Some_INTEGER; UNPROTECT(1); return myInt; However, it appears that myInt is a signed integer. I have looked over Rdefines.h and it does not look like there is a definition for NEW_UNSIGNED_INTEGER ! How would I export an unsigned integer to R? obviously this won't work: unsigned int Some_INTEGER = 5; unsigned int *p_myInt; SEXP myInt; PROTECT(myInt=NEW_INTEGER(1)); myInt[0] = Some_INTEGER; UNPROTECT(1); return myInt; This would give me a casting error! How should I get arou...