Hi,

I have a situation where I would like to create R data.frame/list
dynamically from the two event callbacks.
1) Event A: it tells what the table column names and types are.
2) Event B: it always follows A and is triggered when a new row of
table described in A becomes available.

Example of interfaces for both event callbacks are:

void onEventA(std::list< std::pair< std::string, int > > columnList)
{
   // columnList is a list containing a pair of column name and type enum
}

void onEventB( mydomain::tickEvent tickObj )
{
   // tickObj corresponds to a row in the event A callback argument.
it has function "getValue<T>(string ColName)" from which you can
retrieve the value from it
}

Inside onEventA, I'd like to be able to create a blank data.frame or
list with zero length vector. Once my data frame or list object is
constructed, I'd like to append a new row to it each time onEventB is
invoked. How can I achieve this in Rcpp? Thank you.

Regards,

Robert
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to