View quiz2.txt
1. Explain in your words what the unnest_token function does | |
2. Explain your words what the gutenbergr package does | |
3. Explain in your words how sentiment lexicon work | |
4. How does inner_join provide sentiment analysis functionality | |
5. Explain in your words what tf-idf does |
View example_aoc.R
library(twitteR) | |
library(tidyverse) | |
library(tidytext) | |
setup_twitter_oauth( | |
consumer_key = Sys.getenv("TWITTER_CONSUMER_KEY"), | |
consumer_secret = Sys.getenv("TWITTER_CONSUMER_SECRET"), | |
access_token = Sys.getenv("TWITTER_ACCESS_TOKEN"), | |
access_secret = Sys.getenv("TWITTER_ACCESS_SECRET") |
View quiz3.txt
1. In your own words describe LDA | |
2. In your own words, describe the process of a full tidy text analysis | |
3. Do a short tidy text analysis where you extract topics, explain why they are good or bad. |
View quiz2.txt
1. Explain in your words what the unnest_token function does | |
2. Explain your words what the gutenbergr package does | |
3. Explain in your words how sentiment lexicon work | |
4. How does inner_join provide sentiment analysis functionality | |
5. Explain in your words what tf-idf does |
View motivating_example_hu.R
library(tidytext) | |
library(tidyverse) | |
# poem from http://www.hungarianreference.com/Poems/Szabo-Lorinc-Szeretlek.aspx | |
hungarian_poem <- c("Szeretlek, szeretlek, szeretlek,", | |
"egész nap kutatlak, kereslek,", | |
"egész nap sírok a testedért,", | |
"szomorú kedves a kedvesért,", | |
"egész nap csókolom testedet,", | |
"csókolom minden percedet.", |
View motivating_example_weinstein.R
# From the blog post on the Weinstein Effect | |
# https://www.gokhanciflikli.com/post/weinstein-effect/ | |
library(GuardianR) | |
library(stringr) | |
library(tidyverse) | |
library(tidytext) | |
library(lubridate) | |
library(rvest) | |
library(ggplot2) |
View quiz1.txt
Dplyr Questions | |
1. Which of the following return a subset of the columns of a data frame ? | |
a) select | |
b) retrieve | |
c) get | |
d) all of the mentioned | |
2. Point out the correct statement : | |
a) The data frame is a key data structure in statistics and in R |
View motivating_example.R
library(twitteR) | |
library(tidyverse) | |
library(tidytext) | |
setup_twitter_oauth( | |
consumer_key = Sys.getenv("TWITTER_CONSUMER_KEY"), | |
consumer_secret = Sys.getenv("TWITTER_CONSUMER_SECRET"), | |
access_token = Sys.getenv("TWITTER_ACCESS_TOKEN"), | |
access_secret = Sys.getenv("TWITTER_ACCESS_SECRET") |
View foo.html
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="generator" content="pandoc" /> |
View ci-calculation-heights.R
> library(MASS) # load the MASS package | |
> height.response = na.omit(survey$Height) | |
> n = length(height.response) | |
> s = sd(height.response) # sample standard deviation | |
> SE = s/sqrt(n); SE # standard error estimate | |
[1] 0.6811677 | |
> | |
> print(paste("Standard Error:", SE)) | |
[1] "Standard Error: 0.68116773214787" | |
> |
NewerOlder