\begin{Schunk}
\begin{Sinput}
 dat$agency <- rowMeans(dat[ , c("Agency1","Agency2","Agency3")], na.rm = TRUE)
 dat$intMotiv <- rowMeans(dat[ , c("Intrin1","Intrin2","Intrin3")], na.rm = TRUE)
 dat$extMotiv <- rowMeans(dat[ , c("Extrin1","Extrin2","Extrin3")], na.rm = TRUE)
 dat$posAffect <- rowMeans(dat[ , c("PosAFF1","PosAFF2","PosAFF3")], na.rm = TRUE)
 dat$negAffect <- rowMeans(dat[ , c("NegAFF1","NegAFF2","NegAFF3")], na.rm = TRUE)
\end{Sinput}
\end{Schunk}
