Hacker Newsnew | past | comments | ask | show | jobs | submit | interiormut's commentslogin

``` 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 because that's the aesthetic of other people (who only see beauty when they look at python) and paying R roles are scarce.

I will say that Python has the `datatable` package by H2o that is close to R's `data.table` in elegance. I wish it had the widespread adoption that Pandas enjoys.

https://datatable.readthedocs.io/en


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: