[datatable-help] Assignment by reference fails silently

Arunkumar Srinivasan aragorn168b at gmail.com
Sun May 25 04:54:40 CEST 2014


This was an effect of fixing FR #2551 not properly (from me). Stricter (and
extensive) tests are added now. Fixed in commit #1277 (v1.9.3).

Thanks for reporting.
Arun.


On Sun, Apr 27, 2014 at 9:14 PM, Arunkumar Srinivasan <aragorn168b at gmail.com
> wrote:

> Thanks for reporting. I've added this case under comments to another
> recently filed issue bug #5442<https://r-forge.r-project.org/tracker/index.php?func=detail&aid=5442&group_id=240&atid=975>from Michele (as I am quite sure they're related to handling column types
> in `:=` without grouping).
>
> Arun.
>
>
> On Fri, Apr 25, 2014 at 7:25 PM, John Laing <john.laing at gmail.com> wrote:
>
>> 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:
>>
>> ## make a simple data.table
>> require(data.table)
>> dt <- data.table(a=1:3, b=4:6, c=NA)
>>
>> ## fails silently
>> dt[, c := "foo"]
>> dt
>>
>> 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.
>>
>> -John
>>
>> _______________________________________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140525/7c555c4c/attachment.html>


More information about the datatable-help mailing list