Right now when adding multiple columns to a data.table one of the options is to do:
dt[, `:=`(col1 = stuff, col2 = moar_stuff)]
I think that this syntax can be a bit confusing (too many equals) but mainly is hard to write. To get the grave accent, on my keyboard I have to press AltGr + } and then space. It's kind of annoying.
So my modest proposal is to just have an alias for :=() that is just a run-off-the-mill common name with no special characters. Maybe (ab)using the set() function? It would end up something like this:
dt[, set(col1 = stuff, col2 = moar_stuff)]
I think it not only reads better, but it's also 87% easier to type.
Right now when adding multiple columns to a data.table one of the options is to do:
I think that this syntax can be a bit confusing (too many equals) but mainly is hard to write. To get the grave accent, on my keyboard I have to press AltGr + } and then space. It's kind of annoying.
So my modest proposal is to just have an alias for
:=()that is just a run-off-the-mill common name with no special characters. Maybe (ab)using theset()function? It would end up something like this:I think it not only reads better, but it's also 87% easier to type.