My question is maybe basic but I have not found the answer on stackoverflow and in the other sources. Thus, I put it here Example data set
yta<-rep(c(200, 201), each=10)
ala<-data.frame(yta)
ala$nr<-0
and now I want to loop over this data set and put the sequence form 1 to i in a new variable nr to unique(ala$yta). it is just example in my data set I have more yta which have uneven number of rows.