Publications by Sascha W.
Catching errors in R and trying something else
I recently encountered some functionality in R which most of you might already know. Nevertheless, I want to share it here, because it might come in handy for those of you who do not know this yet.Suppose you want to read in a large number of very large text tables in R. There is the great function fread() in the data.table package, which is real...
2509 sym
Hyperthreading FTW? Testing parallelization performance in R.
Alright, let’s test some parallelization functionalities in R.The machine:MacBook Air (mid-2013) with 8 GB of RAM and the i7 CPU (Intel i7 Haswell 4650U). This CPU is hyper-threaded, meaning (at least that’s my understanding of it) that it has two physical cores but can run up to four threads.The task:Draw a number of cases from ...
1955 sym 4 img
Graphing football world cup shots with rCharts
So, the FIFA World Cup is over. Germany won. Yay!Now with so much less football matches to watch, I tried the awesome new R package rCharts by Ramnath Vaidyanathan. In this case, I used the capability to generate NVD3 charts. Check it out…You can mouse over the data points (players) to get the name of the player and information abo...
1936 sym
Getting emotional in the absence of something: Using the Berlin Affective Word List to analyze emotional valence and arousal for nouns and adjectives.
This is something I did a while ago using the Berlin Affective Word List (BAWL).The BAWL contains ratings for 2902 German words (2107 nouns, 504 verbs, 291 adjectives). Ratings were collected for emotional valence (bad vs. good), arousal (the grade of valence) and imaginability (how well you can imagine the specific word). Please note...
5631 sym 2 img
Stay on track: Plotting GPS tracks with R
Many GPS devices and apps have the capability to track your current position via GPS. If you go walking, running, cycling, flying or driving, you can take a look at your exact route and your average speed.Some of these devices or apps also allow you to export your routes in various formats, e.g., the popular XML-based GPX format.I want to show yo...
7100 sym 14 img
Mapping the world with tweets
A few days ago, I collected 30 minutes of tweets all around the world. I used the twitteR and streamR packages for this. The nice thing about those tweets is that they have geo-information associated with them. Not all of them, of course, but more than enough.Let’s see, what happens if we plot all the tweets at their respective posi...
7414 sym 16 img
Mapping the world with tweets (including a GIF without cats and a Shiny App).
A few days ago, I collected 30 minutes of tweets all around the world. I used the twitteR and streamR packages for this. The nice thing about those tweets is that they have geo-information associated with them. Not all of them, of course, but more than enough.Let’s see, what happens if we plot all the tweets at their respective posi...
2162 sym 16 img
Changing the font of R base graphic plots.
Want to change the font used in your R plots? I got a quite simple solution that works on Mac OS.You need the function ‘quartzFonts’. With this function, you can define additional font families to use in your R base graphic plots. The default font families are ‘sans’, ‘serif’ and ‘mono’.Let’s say, I want to define a new font fam...
2258 sym 6 img
Changing the font of R base graphic plots.
Want to change the font used in your R plots? I got a quite simple solution that works on Mac OS.You need the function ‘quartzFonts’. With this function, you can define additional font families to use in your R base graphic plots. The default font families are ‘sans’, ‘serif’ and ‘mono’.Let’s say, I want to define a new font fam...
2258 sym 6 img
Time series analysis with R: Testing stuff with NetAtmo data
I’ve got a NetAtmo weather station. One can download the measurements from its web interface as a CSV file. I wanted to give time series analysis with the extraction of seasonal components (‘decomposition’) a try, so I thought it would be a good opportunity to use the temperature measurements of my weather station. The data is available.To ...
2097 sym 4 img