Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eeshanC
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
eeshanC
13y ago
True that. But there is also another side to this story, where such nested calls translates naturally to what we are thinking, i.e. length(unique(text)) comes from the thought "How many(length()) unique (unique()) words are there in th
2.
▲
by
eeshanC
13y ago
Very clean. 1 small change to make it count of frequencies- table(scan('test.txt',character(),sep=" "))
3.
▲
by
eeshanC
13y ago
I'd like to jump in with a little R here- it not all that difficult in "that" either! open(con <- file('text.txt')) text = readLines(con, n= -1L) # n is number of lines to read, -1L means read all of it words = s