[datatable-help] v1.6.5 has been submitted to CRAN

Matthew Dowle mdowle at mdowle.plus.com
Wed Aug 24 23:41:03 CEST 2011


NEW FEATURES

o   The LHS of := may now be column names or positions
    when with=FALSE; e.g.,
    
        DT[,c("d","e"):=NULL,with=FALSE]
        DT[,4:5:=NULL,with=FALSE]
        newcolname="myname"
        DT[,newcolname:=3.14,with=FALSE]
    
    This implements FR#1499 'Ability to efficiently remove a
    vector of column names' by Timothee Carayol in addition to
    creating and assigning to multiple columns. We still plan
    to allow multiple := without needing with=FALSE, in future.
       
o   setkey(DT,...) now returns DT (invisibly) rather than NULL.
    This is to allow compound statements; e.g.,
        setkey(DT,x)["a"]

o   setkey (and key<-) are now more efficient when the data happens
    to be already sorted by the key columns; e.g., when data is
    loaded from ordered files.

o   If DT is already keyed by the columns passed to setkey (or
    key<-), the key is now rebuilt and checked rather than skipping
    for efficiency. This is to save needing to know to drop the key
    first to rebuild an invalid key. Invalid keys can arise by going
    'under the hood'; e.g., attr(DT,"sorted")="z", or somehow ending
    up with unordered factor levels. A warning is issued so the root
    cause can be fixed. Thanks to Timothee Carayol for highlighting.
        
o   A new copy() function has been added, FR#1501. This copies a
    data.table (retaining its key, if any) and should now be used to
    copy rather than data.table(). Reminder: data.tables are not
    copied on write by setkey, key<- or :=.


BUG FIXES

o   DT[,z:=a/b] and DT[a>3,z:=a/b] work again, where a and
    b are columns of DT. Thanks to Chris Neff for reporting,
    and his patience.
        
o   Numeric columns with class attributes are now correctly
    coerced to integer by setkey and ad hoc by. The error
    similar to 'fractional data cannot be truncated' should now
    only occur when that really is true. A side effect of
    this is that ad hoc by and setkey now work on IDate columns
    which have somehow become numeric; e.g., via rbind(DF,DF)
    as reported by Chris Neff.
        
o   .N is now 0 (rather than 1) when no rows in x match the
    row in i, fixing bug #1532. Thanks to Yang Zhang for
    reporting.
        
o   Compatibility with package IRanges has been restored. Both
    data.table and IRanges mask cbind and rbind. When data.table's
    cbind is found first (if it is loaded after IRanges) and the
    first argument is not data.table, it now delegates to the next
    package on the search path (and above that), one or more of 
    which may also mask cbind (such as IRanges), rather than 
    skipping straight to base::cbind. So, it no longer matters 
    which way around data.table and IRanges are loaded, fixing 
    #1534. Thanks to Steve Lianoglou for reporting.
        
        
USER VISIBLE CHANGES

o   setkey's verbose messages expanded.




More information about the datatable-help mailing list