search for: christellacaz

Displaying 2 results from an estimated 2 matches for "christellacaz".

Did you mean: christellacaze
2013 Feb 07
4
help with creating new variables using a loop
Hi there, I've got a set of 10 numeric variables called Mood1 to Mood10 in a dataset called mood. I'm trying to create a set of 10 new variables called m1 to m10 so that m1=Mood1*1, m2=Mood2*2, etc to m10=Mood10*10 Trawling through the internet, I eventually tried the following code: for (i in 1:10){ assign(x=paste0("mood$m",i),
2013 Feb 08
1
help with double looping
hi there, I have a dataframe in the shape vA1, vA2,..., vA11, vB1, vB2,..., VB11,......., VP1, VP2,...., VP11 (so 16 times a sequence of 11 variables) I am trying to build a double loop so that i can apply the function (i-1)*v(i) to the first 10 variables, then the same for the next 10 variables, etc... 16 times. I have tried the following with no luck: iscores<-list() for (j in