[datatable-help] Porting data.table to Rcpp

statquant3 statquant at outlook.com
Tue Apr 30 11:19:23 CEST 2013


Ricky,
I tend to use data.table + Rcpp "a lot" now, my usual usecase is 
1. create a Rcpp function that takes the data.table say "DT" (as a
data.frame)
2. create Rcpp::NumericVectors within the function (say "f")
3: return those vectors as a list and add them by reference to the initial
data.table with DT[, names(f(DT)):=f(DT)]

This works well and is efficient I think, but if you have to do more
complicated stuff, requiring setting keys within C++ that's impossible as it
is. What is missing I think is:

1. Possibility to modify by reference the data.table within C++ ( in this
post
http://stackoverflow.com/questions/15731106/passing-by-reference-a-data-frame-and-updating-it-with-rcpp
Romain Francois showed me how to create another data.frame sharing the same
data than the initial data.table but this is not quite yet what we want (I
think))
2. Possibility to call data.table functions like merge... within C++

This is totally out of my reach I think, as I am barely a user of data.table
and Rcpp, but some brighter devs could find this project interesting 



--
View this message in context: http://r.789695.n4.nabble.com/Porting-data-table-to-Rcpp-tp4665667p4665801.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list