Publications by Johannes B. Gruber on Johannes B. Gruber

(Mis)using Discourse Network Analyzer for manual coding

11.09.2018

For my PhD project, I want to use Supervised Machine Learning (SML) to replicate my manual coding efforts onto a larger data set. That means, however, that I need to put in some manual coding effort before the SML algorithms can do their magic! I used a number of programs already to analyse texts by hand, and they all come with their up- and down...

4633 sym 2 img

Smarter Wordclouds

01.02.2019

Some time ago, I saw a presentation by Wouter van Atteveldt who showed that wordclouds aren’t necessarily stupid. I was amazed since wordclouds were one of the first things I ever did in R and they are still often shown in introductions to text analysis. But the way they are mostly done is, in fact, not very informative. Because the position of...

5697 sym R (4788 sym/10 pcs) 6 img

Smarter Wordclouds

01.02.2019

Some time ago, I saw a presentation by Wouter van Atteveldt who showed that wordclouds aren’t necessarily stupid. I was amazed since wordclouds were one of the first things I ever did in R and they are still often shown in introductions to text analysis. But the way they are mostly done is, in fact, not very informative. Because the position of...

5697 sym R (4788 sym/10 pcs) 6 img

You R my Valentine!

13.02.2019

Today is Valentine’s Day. And since both I and my sweetheart are R enthusiasts, here is how to say “I love you” using a statistical programming language: library("dplyr") library("gganimate") library("ggplot2") hrt_dat <- data.frame(t = seq(0, 2 * pi, by = 0.01)) %>% bind_rows(data.frame(t = rep(max(.$t), 300))) %>% mutate(xhrt = 16 *...

578 sym R (831 sym/1 pcs) 2 img

You R my Valentine!

13.02.2019

Today is Valentine’s Day. And since both I and my sweetheart are R enthusiasts, here is how to say “I love you” using a statistical programming language: library("dplyr") library("gganimate") library("ggplot2") hrt_dat <- data.frame(t = seq(0, 2 * pi, by = 0.01)) %>% bind_rows(data.frame(t = rep(max(.$t), 300))) %>% mutate(xhrt = 16 *...

578 sym R (831 sym/1 pcs) 2 img

Introducing rwhatsapp

22.09.2019

I’m happy to announce that rwhatsapp is now on CRAN. After being tested by users on GitHub for a year now, I decided it is time to make the package available to a wider audience. The goal of the package is to make working with ‘WhatsApp’ chat logs as easy as possible. ‘WhatsApp’ seems to become increasingly important not just as a messa...

6030 sym R (5930 sym/12 pcs) 22 img

Introducing rwhatsapp

22.09.2019

I’m happy to announce that rwhatsapp is now on CRAN. After being tested by users on GitHub for a year now, I decided it is time to make the package available to a wider audience. The goal of the package is to make working with ‘WhatsApp’ chat logs as easy as possible. ‘WhatsApp’ seems to become increasingly important not just as a messa...

6030 sym R (5930 sym/12 pcs) 22 img

(Much) faster unnesting with data.table

20.10.2019

Today I was struggling with a relatively simple operation: unnest() from the tidyr package. What it’s supposed to do is pretty simple. When you have a data.frame where one or multiple columns are lists, you can unlist these columns while duplicating the information in other columns if the length of an element is larger than 1. library(tibble) d...

2762 sym R (2392 sym/5 pcs)

Get all your packages back on R 4.0.0

26.04.2020

R 4.0.0 was released on 2020-04-24. Among the many news two stand out for me: First, R now uses stringsAsFactors = FALSE by default, which is especially welcome when reading in data (e.g., via read.csv) and when constructing data.frames. The second news that caught my eye was that all packages need to be reinstalled under the new version. This ca...

2444 sym R (1193 sym/5 pcs)

Let users choose which plot you want to show

27.07.2021

If you have build your homepage using blogdown, it’s actually quite simple to integrate Javascript snippets in it. While this is mentioned in the book “blogdown: Creating Websites with R Markdown”, it still took me a little bit to undertstand how it works. As an example, let’s make different versions of a simple plot and let the user deci...

1515 sym R (1063 sym/3 pcs) 2 img