[datatable-help] What's your opinion on the feature request: add option mult="random"

Matthew Dowle mdowle at mdowle.plus.com
Tue Jan 10 00:34:38 CET 2012


On Sun, 2012-01-08 at 21:36 +0100, Christoph Jäckel wrote:
> So should I update the documentation to make it clearer that mult=
> only works if i is a data.table?

Great, yes please. A warning message would be good too saying something
like 'ignoring mult because i isn't data.table', and a test that checks
that warning is produced.

We've ended up with some nice enhanced flexibility for mult, but rightly
or wrongly I'm still a little uncomfortable with mult=sample(.N,size=1)
_when_ that's being repeating for the same join many times. Dennis's
solution where he joined just once per year, followed by a vectorized
sample, seems a more efficient way to structure it, if possible.

Matthew





More information about the datatable-help mailing list