[R] Counting Words

Ista Zahn istazahn at gmail.com
Thu Jan 22 19:57:50 CET 2015


table(strsplit("hola mundo mundo", " ")[[1]])

On Thu, Jan 22, 2015 at 9:25 AM, bgnumis bgnum <bgnumis at gmail.com> wrote:
> Hi all,
>
> I want to cout the different words in a text.
>
> You see if the text is: "hola mundo mundo" the program will count:
>
> hola 1
> mundo 2
>
> Is posible that Cran r have a similar function?
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list