Permalink
Browse files

rename and re-render kieran's regex block

  • Loading branch information...
1 parent afca94a commit 097d4b1a9c36d7e9c000c87dfb11eeb0f6fe8d66 @jennybc jennybc committed Nov 3, 2015
@@ -16,7 +16,6 @@ Install `stringr` if you don't have it already!
library("stringr")
library("dplyr")
library("ggplot2")
-
```
## Part 1: Basic string manipluation in R
@@ -251,7 +250,7 @@ word_counts %>%
This feels like we are winning. Now for some fun: a word cloud.
```{r warning=FALSE, message=FALSE}
#install.packages("wordcloud")
-#devtools::install_github("karthik/wesanderson")
+#install.packages("wesanderson")
library("wordcloud")
library("wesanderson")
@@ -438,7 +438,7 @@ <h4 class="date"><em>October 27, 2015</em></h4>
## 30 China 31</code></pre>
<p>This feels like we are winning. Now for some fun: a word cloud.</p>
<pre class="r"><code>#install.packages(&quot;wordcloud&quot;)
-#devtools::install_github(&quot;karthik/wesanderson&quot;)
+#install.packages(&quot;wesanderson&quot;)
library(&quot;wordcloud&quot;)
library(&quot;wesanderson&quot;)
@@ -447,7 +447,7 @@ <h4 class="date"><em>October 27, 2015</em></h4>
word_counts %&gt;%
top_n(50) %&gt;%
with(wordcloud(word, count, ordered.colors = TRUE, color = pal, use.r.layout = TRUE))</code></pre>
-<p><img src="block027_regular-expressions-2015_files/figure-html/unnamed-chunk-26-1.png" alt="" /></p>
+<p><img src="block027_regular-expressions_files/figure-html/unnamed-chunk-26-1.png" alt="" /></p>
<p>We could also break it up by agency:</p>
<pre class="r"><code>news_clean_tweets &lt;- news_tweets
news_clean_tweets$text &lt;- clean_tweets
@@ -471,7 +471,7 @@ <h4 class="date"><em>October 27, 2015</em></h4>
text(0, 0.9, words_df$user_name[i], cex = 1.5, adj = c(0, 0))
}</code></pre>
-<p><img src="block027_regular-expressions-2015_files/figure-html/unnamed-chunk-27-1.png" alt="" /></p>
+<p><img src="block027_regular-expressions_files/figure-html/unnamed-chunk-27-1.png" alt="" /></p>
</div>
<div id="thats-it" class="section level3">
<h3>That’s it!</h3>
@@ -519,7 +519,7 @@ This feels like we are winning. Now for some fun: a word cloud.
```r
#install.packages("wordcloud")
-#devtools::install_github("karthik/wesanderson")
+#install.packages("wesanderson")
library("wordcloud")
library("wesanderson")
@@ -530,7 +530,7 @@ word_counts %>%
with(wordcloud(word, count, ordered.colors = TRUE, color = pal, use.r.layout = TRUE))
```
-![](block027_regular-expressions-2015_files/figure-html/unnamed-chunk-26-1.png)
+![](block027_regular-expressions_files/figure-html/unnamed-chunk-26-1.png)
We could also break it up by agency:
@@ -560,7 +560,7 @@ for (i in 1:4){
}
```
-![](block027_regular-expressions-2015_files/figure-html/unnamed-chunk-27-1.png)
+![](block027_regular-expressions_files/figure-html/unnamed-chunk-27-1.png)
### That's it!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 097d4b1

Please sign in to comment.