https://stackoverflow.com/questions/57023935/r-question-how-to-do-a-calculation-of-a-mean-off-multiple-columns-and-select-va/57023959#57023959
x2 <- transmute(mydata, circumference,
average_2items = rowMeans(cbind(age, circumference)),
age)
My example that worked.
> x2<-transmute(time1data,commonID,
+ GrowthMindset=rowMeans(cbind(q0008_0001, q0008_0002, q0008_0003, q0008_0004, q0008_0005, q0008_0006, q0008_0007, q0008_0008)),
+ SelfEfficacy=rowMeans(cbind(q0009_0001, q0009_0002, q0009_0003, q0009_0004, q0009_0005))
+ )