\begin{Schunk}
\begin{Sinput}
 ##' A small wrapper to calculate a t-test
 ##' @param dframe A data frame
 ##' @param y character string for name of dependent variable. Default is "IQ"
 ##' @param x character string for name of independent variable. Default is "first"
 ##' @return We return only the p-value. 
 conductTtest <- function (dframe, y = "IQ", x = "first"){
   	t.test(formula(paste(y, "~", x)), data = dframe, var.equal = TRUE)$p.value
  }
 ## Test it once, wrapping 2 function calls together
 conductTtest(getTdata(1, N = "30:30", M = "98:103", SD = "15:15"))
\end{Sinput}
\begin{Soutput}
[1] 0.02832306
\end{Soutput}
\begin{Sinput}
 ## Create a one-step wrapper to put those together
 runOneSim <- function(nreps, N, M, SD){
      df <- getTdata(1, N = "30:30", M = "98:103", SD = "15:15")
      reslt <- conductTtest(df)
      reslt
  }
\end{Sinput}
\end{Schunk}
