\begin{Schunk}
\begin{Sinput}
  origname <- mycolnames[2] ##need a copy
  mycolnames[2] <- "WhateverPJSays"
  colnames(dat) <- mycolnames
  colnames(dat)
\end{Sinput}
\begin{Soutput}
[1] "grp"            "WhateverPJSays" "mar"            "sex"            "noise"          "moreNoise"      "newed"         
\end{Soutput}
\end{Schunk}
