A Blog mostly about R

This is a blog about R programming and data analysis.

Written by Christian Ryan

3.4 Variable trimming and twitter objects

A quick explanation is in order as to why this blogpost is only just being posted now, despite having been written over a year ago. If you know me personally, you will already know the answer - and if you do not, let’s just say grief can mess with the best-laid plans. Introduction This blogpost is a continuation of the previous three on Twitter data, so as a preliminary step we will load the packages collection tidyverse and retrieve the cleaned data, which was saved as london_3.

By Christian Ryan

January 3, 2023

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