[datatable-help] fread'ing logicals

Chinmay Patil chinmay.patil at gmail.com
Sat Sep 14 06:03:43 CEST 2013


I agree.. One of the criticism I hear about newer packages in R ecosystem
is inconsistency with existing conventions. I would also vote for
consistency with read.csv / read.table


On Sat, Sep 14, 2013 at 2:25 AM, Chris Neff <caneff at gmail.com> wrote:

> I would prefer that you stay consistent with read.csv unless you really
> have a good reason.  I don't think this is a good enough reason. They can
> specify colClasses or change it after the fact.
>
>
> On Fri, Sep 13, 2013 at 2:19 PM, Matthew Dowle <mdowle at mdowle.plus.com>wrote:
>
>>
>> All,
>>
>> I've implemented skipping columns using NULL in colClasses,   and
>> logicals are now also read.  read.csv reads "T","F","TRUE","FALSE","True"
>> and "False" as type logical,  so I've followed suit.   But I'm wondering
>> about the single letters "T" and "F".  To illustrate, the following might
>> be confusing :
>>
>> > fread("A,B,C\nD,E,F\n")
>>    A B     C
>> 1: D E FALSE
>> > fread("A,B,C\nD,E,F\nG,H,I\n")
>>    A B C
>> 1: D E F
>> 2: G H I
>> >
>>
>> Should fread treat "T" and "F" as logical?   Should it read a column of
>> only 0's and 1's as logical, too? I think I'd prefer that as it's quite
>> common.
>>
>> I'm also thinking of increasing the number of rows used for type
>> detection to the top 500, middle 500 and bottom 500,  since that's a very
>> small extra cost to save the relatively much larger cost of mid read column
>> bumps. As a parameter, with 500 by default.
>>
>> Matthew
>>
>>
>> ______________________________**_________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.**r-project.org<datatable-help at lists.r-forge.r-project.org>
>> https://lists.r-forge.r-**project.org/cgi-bin/mailman/**
>> listinfo/datatable-help<https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help>
>>
>
>
> _______________________________________________
> 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/20130914/72c89643/attachment.html>


More information about the datatable-help mailing list