This post has NOT been accepted by the mailing list yet.
I don't know R but I know C++. I need to connect exiting C++ application to R. I read Writing R extension manual and other helpers. I made simple connection tests with .C(), .Call(), RCpp .Call(). But I didn't find a table or set of examples with relationships between R types and complex C/C++ types.
In my case I need to use
- STL vector with double
- C/C++ structure or class which have double, integer, and character array (or STL string)
- STL vector with structure or class
Also it is not clear how to use PROTECT - UNPROTECT functions if it is not mistakes in Writing R extension (see example from page 111 below). Maybe UNPROTECT(1) instead of UNPROTECT(4)? Similar issue on page 110.