4 ms·
These days I tend to use R for these type problems. It’s slow, but vectors as first-class data types simplify things a lot readLines(file) |> strsplit(“ +”) |>
by ribit 4y ago
These days I tend to use R for these type problems. It’s slow, but vectors as first-class data types simplify things a lot
readLines(file) |>
strsplit(“ +”) |>
unlist() |>
table() |>
sort(desc = TRUE)