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 <[email protected]>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
> [email protected].**r-project.org<[email protected]>
> 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
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to