[datatable-help] changing data.table by-without-by syntax to require a "by"
nachti
kpm.nachtmann at gmail.com
Wed May 7 11:02:15 CEST 2014
The change of the defaults in 1.9.3 breaks existing code, which shoud not be
(see. DT FAQ 1.8). Would be fine if there is a possibility that code works
with different versions of DT and R (e.g. for usage in packages).
See the example here: https://gist.github.com/nachti/34b2dc46868b9268c5af
<https://gist.github.com/nachti/34b2dc46868b9268c5af>
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
<http://r.789695.n4.nabble.com/Change-in-list-behavior-inside-join-td4687469.html>
and I can't switch back to an older R-Version because of missing permissions
on the server. I have to use a different versions of R and DT parallel.
If I rewrite my code that it works for 1.9.3, it doesn't work with 1.8.10
any more. (see also
http://stackoverflow.com/questions/23289646/update-subset-of-data-table-based-on-join-using-data-table-1-9-3-does-not-work-a
<http://stackoverflow.com/questions/23289646/update-subset-of-data-table-based-on-join-using-data-table-1-9-3-does-not-work-a>
by = key(something) is not the same as by = .EACHI, but even if I can get a
solution using the first, 1.8.10 gives a warning, that I shouldn't do that:
In addition: Warning message:
In `[.data.table` ...:
by is not necessary in this query; it equals all the join columns in the
same order. j is already evaluated by group of x that each row of i matches
to (by-without-by, see ?data.table). Setting by will be slower because a
subset of x is taken and then grouped again. Consider removing by, or
changing it.
nachti
--
View this message in context: http://r.789695.n4.nabble.com/changing-data-table-by-without-by-syntax-to-require-a-by-tp4664770p4690100.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list