<div dir="ltr">If I create a logical column in my data.table and try to assign-by-reference a character value to it, the assignment fails silently. That is, it doesn't work but doesn't throw an error:<div><br></div>

<div><div>## make a simple data.table</div><div>require(data.table)</div><div>dt <- data.table(a=1:3, b=4:6, c=NA)</div><div><br></div><div>## fails silently</div><div>dt[, c := "foo"]</div><div>dt</div><div>

<br></div><div>In other cases where an action would lead to the implicit conversion of a column, data.table throws an error suggesting that the user convert the column explicitly if that's what they really mean to do. I think that's the right behavior and should be adopted in this case as well.</div>

<div></div></div><div><br></div><div>-John</div></div>