Word frequency: Difference between revisions

Content added Content deleted
Line 3,823: Line 3,823:


=={{header|R}}==
=={{header|R}}==
===='''Version 1'''====
===Version 1===
I chose to remove apostrophes only if they're followed by an s (so "mom" and "mom's" will show up as the same word but "they" and "they're" won't). I also chose not to remove hyphens.
I chose to remove apostrophes only if they're followed by an s (so "mom" and "mom's" will show up as the same word but "they" and "they're" won't). I also chose not to remove hyphens.
<lang R>
<lang R>
Line 3,859: Line 3,859:
</pre>
</pre>


===='''Version 2'''====
===Version 2===
This version is purely functional using the native pipe operator in R 4.1+ and runs in less than a second.
This version is purely functional using the native pipe operator in R 4.1+ and runs in less than a second.
<lang R>
<lang R>