Re: [Rd] Call R From VC++

2006-06-08 Thread TB
Shilpi, shilpi harpavat wrote: > I want to write an independent C++ application that > can call any R functions and output it as an > c++object. > I tried to use The documentation for Linking R DLL > with VC++ But with no success. > When I link R.dll it says Invalid or

Re: [Rd] R_MakeExternalPtr

2005-10-24 Thread TB
Brian, Prof Brian Ripley wrote: > This is one of those undocumented things (AFAIK): LENGTH applies only > to 'vectors'. So don't use t and definitely don't set it for others. > The macro expands to > > #define LENGTH(x) (((VECSEXP) (x))->vecsxp.length) > > What

[Rd] R_MakeExternalPtr

2005-10-24 Thread TB
Hi, I'm using R_MakeExternalPtr() to store handles to (COM) objects in a SEXP. The code basically is sexp = R_MakeExternalPtr(handle,R_NilValue,R_NilValue); R_RegisterCFinalizerEx(...); After creating the sexp, LENGTH(sexp) returns some quite large integer value. It seems like a