My site will remain here but my blog has migrated to the address below: http://psychwire.wordpress.com/ Thanks!

**Blog**

# Blog has Moved!!

*Posted by hayward on May 11, 2011*

http://www.psychwire.co.uk/2011/05/blog-has-moved/

# Charting the Defeat of AV using R (and some ggplot2 and merge operations on top)

In this post, I’ll be graphing some results from a recent referendum held here in the UK and combining it with the results of a set of local elections that were held at the same time. I’ll give some examples of graphing stuff using ggplot2 and will also show some info regarding merging datasets. At […]

*Posted by hayward on May 8, 2011*

http://www.psychwire.co.uk/2011/05/charting-the-defeat-of-av-using-r-and-some-ggplot2-and-merge-operations-on-top/

# Is R an ideal language to teach the fundamentals of programming to researchers with no experience in programming?

UPDATE: I’ve modified the title of this post a bit to clarify what I was really thinking when I wrote it. What I was really thinking was which programming language to choose to teach some fellow researchers how to get into the absolute basics of programming, out of the very limited set of languages I […]

*Posted by hayward on May 6, 2011*

http://www.psychwire.co.uk/2011/05/is-r-an-ideal-language-to-teach-the-fundamentals-of-programming-to-beginners/

# Loops, Conditionals and Variables: A Basic Simulation in R

In this post, I’m going to go over some basics of using conditionals and loops in R. I’ll expand on the example I use here in future posts. The conditionals and loops will be used to create some dummy eye movement data. Background Before I get into the actual code itself, I should probably explain […]

*Posted by hayward on May 3, 2011*

http://www.psychwire.co.uk/2011/05/loops-conditionals-and-variables-a-basic-simulation-in-r/

# Data Aggregation in R: plyr, sqldf and data.table

I’ve previously put up a couple of posts about aggregating data in R. In this post, I’m going to be trying some other alternative methods for aggregating the dataset. Before I begin, I’d like to thank Matthew Dowle for highlighting these to me. It’s a bit daunting at first, deciding which method of aggregating data is best. […]

*Posted by hayward on April 28, 2011*

http://www.psychwire.co.uk/2011/04/data-aggregation-in-r-plyr-sqldf-and-data-table/

# Further Adventures in Visualisation with ggplot2

So I previously took a look at some data of player performance from a computer game. In this post, I’m going to do some further visualisations using ggplot2. The data consists of different types of player character, different roles for those characters, and their overall damage output (the unit here is damage per second, or […]

*Posted by hayward on April 25, 2011*

http://www.psychwire.co.uk/2011/04/further-adventures-in-visualisation-with-ggplot2/

# Sexy, Geeky Graphs using ggplot2 in R

So I’ve been looking for some data to play with while learning R, other than the data I’m analysing for various experiments and papers I’m working on. I thought to myself, “Hey, this R stuff is pretty geeky. Can I engage in a higher level of geekiness?” And I think I’ve found a way: using […]

*Posted by hayward on April 22, 2011*

http://www.psychwire.co.uk/2011/04/sexy-geeky-graphs-using-ggplot2-in-r/

# Aggregate Function in R: Making your life easier, one mean at a time

I previously posted about calculating medians using R. I used tapply to do it, but I’ve since found something that feels easier to use (at least to me). ?View Code RSPLUSaggregated_output = aggregate(DV ~ IV1 * IV2, data=data_to_aggregate, FUN=median) aggregated_output The above code saves an aggregated dataset to aggregated_output and gives you the median in […]

*Posted by hayward on April 20, 2011*

http://www.psychwire.co.uk/2011/04/aggregate-function-in-r-making-your-life-easier-one-mean-at-a-time/

# RStudio, Revolution Analytics and Deducer: A Tale of Three GUIs

I’m in the process of moving from SPSS to R at the moment. It’s not been the easiest of rides, but then learning how to do a core part of your job never really should be. It’s been fun, though – don’t get me wrong – it’s definitely been an adventure!! Here I’m going to […]

*Posted by hayward on April 19, 2011*

http://www.psychwire.co.uk/2011/04/rstudio-revolution-analytics-and-deducer-a-tale-of-three-guis/

# Pivot Tables and Medians in R

Pivot Tables are a useful way of aggregating data into the format that you’re after. In this example, I’m going to be using R to pivot some data and calculate medians for me. This is useful because Excel can calculate medians (the =MEDIAN(values)) function, but what it can’t do is calculate medians for Pivot Tables. […]

*Posted by hayward on April 16, 2011*

http://www.psychwire.co.uk/2011/04/pivot-tables-and-medians-in-r/