[datatable-help] changing data.table by-without-by syntax to require a "by"

Arunkumar Srinivasan aragorn168b at gmail.com
Wed May 7 14:27:30 CEST 2014


Once agan, thanks for the example. That wasn't a bug. It's how it was intended to work with prior versions of data.table. But to make things much more consistent (as per user requests and FRs filed), this change is now being implemented. 

Your point that there should be ways to make sure existing code doesn't break down is totally valid and we'll do whatever we can to get there. You've to realise this is a development version - we're working on it. And these things will get fixed only in due time. Until then, there's no other way but to get around these issues until we fix it, unfortunately - unless you or someone else would like to help us.

Arun

From: nachti kpm.nachtmann at gmail.com
Reply: nachti kpm.nachtmann at gmail.com
Date: May 7, 2014 at 1:30:16 PM
To: datatable-help at lists.r-forge.r-project.org datatable-help at lists.r-forge.r-project.org
Subject:  Re: [datatable-help] changing data.table by-without-by syntax to require a "by"  

Arunkumar Srinivasan wrote
> The change of the defaults in 1.9.3 breaks existing code, which shoud not
> be 
> (see. DT FAQ 1.8).
> Thanks. Yes, that's what will be the case when it hits CRAN. There will be
> an option to use the older feature, IIUC. Matt can clarify this point
> further.
>  
> I know that 1.9.3 is a development version, but I can't use 1.9.2 due to 
> http://r.789695.n4.nabble.com/Change-in-list-behavior-inside-join-td4687469.html 
> Can you show us an example that 1.9.2 doesn't but 1.9.3 does?

Copied from
http://r.789695.n4.nabble.com/Change-in-list-behavior-inside-join-td4687469.html  

#####
Just another example (maybe to be included to test.data.table), which does
not do, what I expected (v. 1.9.2 - it's also fixed in 1.9.3)

> require(data.table)

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: powerpc64-unknown-linux-gnu (64-bit)
...
other attached packages:
[1] data.table_1.9.2

> example(data.table)
> DT
x y v v2 m
1: a 1 42 NA 42
2: a 3 42 NA 42
3: a 6 42 NA 42
4: b 1 4 84 5
5: b 3 5 84 5
6: b 6 6 84 5
7: c 1 7 NA 8
8: c 3 8 NA 8
9: c 6 9 NA 8

> setkey(DT)
> DT[J("a"), list(v, y)]
x v y
1: a 42 1
> DT[J("a"), list(v, y, i = "text")]
x v y i
1: a 42 1 text

##### With data.table 1.9.3 it's working fine:
> require(data.table)

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: powerpc64-unknown-linux-gnu (64-bit)
...
other attached packages:
[1] data.table_1.9.3

> example(data.table)

> setkey(DT)
> DT[J("a"), list(v, y)]
v y
1: 42 1
2: 42 3
3: 42 6
> DT[J("a"), list(v, y, i = "text")]
v y i
1: 42 1 text
2: 42 3 text
3: 42 6 text

nachti  
#####


Arunkumar Srinivasan wrote
> In your case, you should be using stable 1.9.2 version (at least until
> counter measures are in place for by=.EACHI). And you should ask your
> administrators to downgrade R, if you don't want that bug to bite you,
> until this is fixed. But I'm repeating myself.
>  
> Arun





--
View this message in context: http://r.789695.n4.nabble.com/changing-data-table-by-without-by-syntax-to-require-a-by-tp4664770p4690105.html
Sent from the datatable-help mailing list archive at Nabble.com.
_______________________________________________
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/20140507/97103d00/attachment.html>


More information about the datatable-help mailing list