A quick Random R thing I use a lot, recently learned, and I want you to know it too. In this post I’ll show you how to make a quick interactive plot with ggplot and plotly, so that values are displayed when you hover your mouse over it. Why would you want this? If you are exploring the data, you want some quick insights into which values are where. [Read More]
Use `purrr` to feed four cats
Replacing a for loop with purrr::map_*
Use purrr to feed four cats In this example we will show you how to go from a ‘for loop’ to purrr. Use this as a cheatsheet when you want to replace your for loops. Imagine having 4 cats. (like this one:) Four real cats who need food, care and love to live a happy life. They are starting to meow, so it’s time to feed them. Our real life algorithm would be: [Read More]
Make more useless packages!
For fun! and like learning, but mostly fun, really...
You should make more useless packages. To be more specific: make packages that are useful to you, but might be useless to others. Because building silly stuff is fun and sets the bar low for you to play and learn. I’m a big fan of Simone Giertz (see all the gifs in this post). Simone is known as the ‘Queen of Shitty Robots’ and has a youtube channel where she builds robots that are, uhm, not very good at the thing they’re designed for. [Read More]
Arthur blinked, Ford shrugs, but Zaphod leapt; text as graph
Text can be interpreted as a graph
Can we make the computer say something about characters in a book? In this piece I will search for the names of characters and the words around those names in books. What can we learn about a character from text analysis? Of course it’s also just another excuse for me to read the Hitchhikers series! I will break down the text into chunks of two words, extract the word pairs that matter and visualize the results. [Read More]
Reading in an epub (ebook) file with the pubcrawl package
In this tutorial I show how to read in a epub file (f.i. from your ebook collection on you computer) into R with the pubcrawl package. In emoji speak: 🍺📖📦 . I will show the reading in part, (one line of code) and some other actions you might want to perform on textfiles before they are ready for text analysis. After you read in your epub file you can do some cool analyses on it, but that is part of the next blogpost. [Read More]