You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[R-Forge #5754] GForce functions and row- + col-wise operations on .SD #523
changed the title [-][R-Forge #5754] Implement functions for row-wise and col-wise operations on `.SD`[/-][+][R-Forge #5754] GForce functions and row- + col-wise operations on .SD[/+]on Jun 8, 2014
Any plans for optimization of head(.SD, 2)? or .SD[1:2].
IMO there could be tons of cases to make optimization, so it may be better to deal with data.table modularity extension, so any future optimization can be cleaner and easier to contribute.
This may be a bad fit for GForce, but it would be nice to have an optimized version of :, perhaps. It's common that people want to use that with single-row groups, like: https://stackoverflow.com/a/44664086
Activity
[-][R-Forge #5754] Implement functions for row-wise and col-wise operations on `.SD`[/-][+][R-Forge #5754] GForce functions and row- + col-wise operations on .SD[/+]`gmin` and `gmax` done. Partially address #5754 (git #523)
arunsrinivasan commentedon Jun 18, 2014
Benchmarks for
gminandgmaxon data just big enough to highlight the difference.Data:
min, no na.rm
min, with na.rm
max, no na.rm
max, with na.rm
And here's a comparison putting everything together:
matthieugomez commentedon Nov 12, 2014
Ideally, quantile, cov & corr would be great.
arunsrinivasan commentedon Jan 7, 2015
lead/lagimplemented asshift(). See #965.GForce min/max for characters, #523.
gforce now optimises 'median' as well, #523.
arunsrinivasan commentedon Oct 30, 2015
gmedianalways returnsnumerictype, so that we don't have to wrap with the annoyingas.numeric()and is very fast. Using the same data as above:without
na.rm = TRUEwith
na.rm = TRUEMinor: s/max/median in error messages, #523.
2 remaining items
head(.SD, 1) and tail(.SD,1) are gforce optimised, #523.
.SD[val] and col[val] optimised with GForce, #523.
jangorecki commentedon Dec 8, 2015
Any plans for optimization of
head(.SD, 2)? or.SD[1:2].IMO there could be tons of cases to make optimization, so it may be better to deal with data.table modularity extension, so any future optimization can be cleaner and easier to contribute.
arunsrinivasan commentedon Feb 4, 2016
var,sdandprodare now GForce optimised as well.var
sd
var, sd and prod functions are all GForce optimised for speed/memory, #…
MichaelChirico commentedon Jan 13, 2017
Could
is.naperhaps be added to the list? I've been seeing a few examples of this recently.franknarf1 commentedon Jun 21, 2017
This may be a bad fit for GForce, but it would be nice to have an optimized version of
:, perhaps. It's common that people want to use that with single-row groups, like: https://stackoverflow.com/a/44664086franknarf1 commentedon Feb 20, 2018
How about
anyandall? Example from SO:Seems
anyis analogous tomax; andalltomin.kdkavanagh commentedon Sep 29, 2020
Any idea if
seqwould be possible to convert to a GForce function? Common usecase would be:franknarf1 commentedon Sep 29, 2020
@kdkavanagh Fyi, for that you can create a column with
df[, v := rowid(grp)]