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
It's a little hack-y, but if you feel your speed comparison would be a better representation with vectorized defaults, then this is an option. Or perhaps as an additional comparison, demonstrating why perhaps having vectorized defaults (or non-vectorized "when" values) could be a good thing for data.table.
(More of a suggestion than an issue, feel free to close.)
The text was updated successfully, but these errors were encountered:
The data.table issue I linked to (it's still open) is discussing that at length, and it is on the "Master list of most-requested issues" (Rdatatable/data.table#3189). I agree, though my expectation of safe recycling is different than R's default behavior: I'd expect length .N or 1, nothing else (not .N/2, for instance).
https://markfairbanks.github.io/tidytable/articles/speed_comparisons.html correctly states that
data.table::fcase(..., default)
must be length 1, but you can work around this using a catch-allrep(TRUE, .N)
:(A similar approach was mentioned several months ago in Rdatatable/data.table#4258 (comment).)
It's a little hack-y, but if you feel your speed comparison would be a better representation with vectorized defaults, then this is an option. Or perhaps as an additional comparison, demonstrating why perhaps having vectorized defaults (or non-vectorized "when" values) could be a good thing for
data.table
.(More of a suggestion than an issue, feel free to close.)
The text was updated successfully, but these errors were encountered: