``` library(data.table) purchases[amount <= median(amount)*10][, .(total = sum(amount - discount)), by = .(country)][order(country)] ``` - no quotes needed - no loc needed - only 1 groupby needed
As a long-time R user, I truly miss the elegance of `data.table` and base R in general. Today, I mostly write in Rust and Python. But R just feels elegant and purposeful. I force myself to avoid R these days though…
``` library(data.table) purchases[amount <= median(amount)*10][, .(total = sum(amount - discount)), by = .(country)][order(country)] ``` - no quotes needed - no loc needed - only 1 groupby needed
As a long-time R user, I truly miss the elegance of `data.table` and base R in general. Today, I mostly write in Rust and Python. But R just feels elegant and purposeful. I force myself to avoid R these days though…