Blog Archives

Beautiful plots while simulating loss in two-part procrustes problem

April 14, 2015
By
Beautiful plots while simulating loss in two-part procrustes problem

Today I was working on a two-part procrustes problem and wanted to find out why my minimization algorithm sometimes does not converge properly or renders unexpected results. The loss function to be minimized is with denoting the Frobenius norm, is an unknown scalar and an unknown rotation matrix, i.e. . , and are four real

Read more »

QQ-plots in R vs. SPSS – A look at the differences

December 15, 2014
By
QQ-plots in R vs. SPSS – A look at the differences

We teach two software packages, R and SPSS, in Quantitative Methods 101 for psychology freshman at Bremen University (Germany). Sometimes confusion arises, when the software packages produce different results. This may be due to specifics in the implemention of a method or, as in most cases, to different default settings. One of these situations occurs

Read more »

Using colorized PNG pictograms in R base plots

September 12, 2014
By
Using colorized PNG pictograms in R base plots

Today I stumbled across a figure in an explanation on multiple factor analysis which contained pictograms.   Figure 1 from Abdi & Valentin (2007), p. 8. I wanted to reproduce a similar figure in R using pictograms and additionally color them e.g. by group membership . I have almost no knowledge about image processing, so

Read more »

Sending data from client to server and back using shiny

November 20, 2013
By
Sending data from client to server and back using shiny

After some time of using shiny I got to the point where I needed to send some arbitrary data from the client to the server, process it with R and return some other data to the client. As a client/server programming newbie this was a challenge for me as I did not want to dive

Read more »

Creating a text grob that automatically adjusts to viewport size

August 1, 2012
By
Creating a text grob that automatically adjusts to viewport size

I recently wanted to construe a dashboard widget that contains some text and other elements using the grid graphics system. The size available for the widget will vary. When the sizes for the elements of the grobs in the widget are specified as Normalised Parent Coordinates the size adjustments happen automatically. Text does not automatically adjust though. The

Read more »

Useful R snippets

March 18, 2012
By
Useful R snippets

In this post we collect several R one- or few-liners that we consider useful. As our minds tend to forget these little fragments we jot them down here so we will find them again. Indexing in nested loops Every once in a while I run a nested loop like the following one. Now if I

Read more »

multi-platform real-time ‘intro’ in R using rdyncall

July 29, 2011
By
multi-platform real-time ‘intro’ in R using rdyncall

Guest post by Daniel Adler. Below is a real-time audio-visual multimedia demonstration – or in short ‘an intro’ – written in 100% pure R. It requires no compilation and runs across major platforms via the package rdyncall and preinstalled precompiled standard libraries such as OpenGL and SDL libraries. This ‘happy-birthday’ production runs about 3 minutes

Read more »

Using R, Sweave and Latex to integrate animations into PDFs

April 18, 2011
By
Using R, Sweave and Latex to integrate animations into PDFs

The first week of April I attended an excellent workshop on biplots held by Michael Greenacre and Oleg Nenadić at the Gesis Institute in Cologne, Germany. Throughout his presentations, Michael used animations to visualize the concepts he was explaining. He also included  animations in some of his papers. This inspired me to do this post

Read more »

Animate .gif images in R / ImageMagick

November 21, 2010
By
Animate .gif images in R / ImageMagick

Yesterday I surfed the web looking for 3D wireframe examples to explain linear models in class. I stumbled across this site where animated 3D wireframe plots are outputted by SAS.  Below I did something similar in R. This post shows the few steps of how to create an animated .gif file using R and ImageMagick.

Read more »

Progress bars in R (part II) – a wrapper for apply functions

January 10, 2010
By
Progress bars in R (part II) – a wrapper for apply functions

In a previous post I gave some examples of how to make a progress bar in R. In the examples the bars were created within loops. Very often though I have situations where I would like have a progress bar when using apply(). The plyr package provides several apply-like functions also including progress bars, so

Read more »