[datatable-help] Fail to add new columns within a function

Huashan Chen chenhuashan at gmail.com
Mon Dec 16 00:26:24 CET 2013


Hi Matthew,

Thank you for the thoughtful reply. It's from a real example I am using
where a master dataset is to be merged with other datasets by selected rows
and columns(may or may not exist in master dataset). This function is call
multiple times. As can see from the simple example, a master dataset is
passed in by reference to avoid duplications. 

As you also pointed out, alloc.col(DT, some large value) outside the
function can fix this problem. But I am wondering if the all.col() call
within the function could be more preferable?



--
View this message in context: http://r.789695.n4.nabble.com/Fail-to-add-new-columns-within-a-function-tp4682173p4682250.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list