\begin{Schunk}
\begin{Sinput}
 ##' Calculate difference between groups
 ##'
 ##' This setup is lazy because it assumes the names
 ##' of the variables are simply "first" and "IQ". 
 ##' I'd never do this in a real project.
 ##' @param dframe a data frame with input data
 ##' @return A floating point number for the difference
 getDiff <- function(dframe){
      diff(aggregate(IQ ~ first, data = dframe, mean)$IQ)
  }
\end{Sinput}
\end{Schunk}
