A Blog mostly about R

This is a blog about R programming and data analysis.

Written by Christian Ryan

3.3 - Rogue hexadecimal codes and word elongation

Retrieving our data This blog post is a continuation of the previous two (3.1 & 3.2) examining tweets about covid, downloaded using the rtweet package. If you are coming to this blogpost cold, there is a quick way to get the data as we left it at the end of blogpost 3.2. I have saved the cleaned dataset in my package as london_2. You can install the r4psych package, run library(r4psych) and then import the data with the data(london_2) command.

By Christian Ryan

November 26, 2021

3.2 - Further text cleaning

Getting the data This blog post is a continuation of the previous one (3.1) examining tweets about covid we downloaded using the rtweet package. If you followed along with blog post 3.1 and saved your data after we made changes, you can reload that data now, and skip to the next section. If you didn’t save it, but you have installed the r4psych package, to reload the data you can run library(r4psych) and data(london) (but note that I rename my dataset to df).

By Christian Ryan

November 12, 2021

3.1 - Capturing tweets for psychological analysis

It has been a while since my last blog post - I got a bit distracted writing a book about R… This blog post will be the first in a short series on using sentiment analysis with twitter data. When Covid-19 first started to affect Ireland, back in March 2019, a few colleagues and I were discussing the apparent differences in attitudes between countries towards the collective action required to enforce lockdowns and social distancing - particularly viewing these differences through the lens of Fisk’s relational models theory (1992).

By Christian Ryan

October 7, 2021

2.4 - Sentiment analysis of dreams

In the last post we compared the dream sets by graphing the most frequently occurring words and calculating correlation coefficients. But in psychology, we are often interested in specific aspects of the text to analyse. From my own perspective, emotional language use is of particular interest. A further way in which we could compare the dreams is by carrying out a sentiment analysis. One could use bespoke software such as the LIWC programme ( http://liwc.

By Christian Ryan

February 15, 2020

2.3 - Using tidytext to compare samples of dreams

This is the third post in the series exploring text analytics with data from the dreambank.com. In the first post ‘Pulling text data from the internet’, I demonstrated how to use the rvest package to pull text data from the dreambank website. In the second post ‘Manipulating text data from dreams’ we saw how to turn the dream texts into a tidy format by unnesting the word tokens in each dream and running counts on the word frequencies.

By Christian Ryan

January 27, 2020